atuinsh/atuin

[Bug]: Incompatibility with oh-my-zsh plugin per-directory-history

sysadmind opened this issue · 2 comments

What did you expect to happen?

After running commands, I expect to see them listed in atuin history list, atuin search and ctrl+r.

What happened?

I installed Atuin via the shell script and ran atuin import auto to import my zsh history. This worked as expected and I can see all of my previous commands in history. ctrl+r, atuin history, and atuin search all show my history from zsh. The next command that I run does not show up in ctrl+r or atuin search. It apears that atuin history list shows an entry, but the command is just empty. It shows the time of the command and how long it took to run, but no command. ctrl+r seems to know how long ago my last command was run, but it seems to lump all these "empty" commands together.

➜  ~ atuin history list | tail -n 10
2024-03-18 14:22:11		1s
2024-03-18 14:23:08		8ms
2024-03-18 14:23:12		13ms
2024-03-18 14:23:29		60ms
2024-03-18 14:23:52		893ms
2024-03-18 14:24:17		19ms
2024-03-18 14:27:41		16ms
2024-03-18 14:27:43		7ms
2024-03-18 14:27:46		115ms
2024-03-18 14:29:30		0s

I am using https://github.com/ohmyzsh/ohmyzsh with the plugin https://github.com/jimhester/per-directory-history. This has always enabled me to limit my up arrow and ctrl+r to commands that I have executed in the current directory. After disabling the plugin, atuin search, atuin history list, and ctrl+r all seem to work as expected.

I notice that atuin does have a local directory search option if you use ctrl+r several times to cycle the context. It would be cool if the history import understood the per-directory-history to fill that information in to Atuin's internal storage. I have not looked into if it's possible, but I would also like to default to the local directory search via ctrl+r.

I'm happy to provide any more details to help with investigation. I understand that compatibility with the per-directory-history plugin may not be something that Atuin is interested in supporting.

Atuin doctor output

Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

atuin:
  version: 18.1.0
  sync: null
shell:
  name: zsh
  plugins:
  - atuin
system:
  os: Ubuntu
  arch: x86_64
  version: '22.04'
  disks:
  - name: /dev/mapper/vgubuntu-root
    filesystem: ext4
  - name: /dev/mapper/vgubuntu-root
    filesystem: ext4
  - name: /dev/nvme0n1p3
    filesystem: ext4
  - name: /dev/nvme0n1p2
    filesystem: vfat

Code of Conduct

  • I agree to follow this project's Code of Conduct

Is there any news on this / did you find a workaround?

No news. I have disabled the zsh plugin for now. When I want to search history and I want to limit the search to the current directory, I use the atuin interface to handle the search. I do not use atuin for my up arrow search which is where I miss the per-directory search the most at this point.