atuin
atuin copied to clipboard
nushell: Commands using double wildcards are not recorded correctly
When using commands that contain double wildcards, e.g. ls **/* | where type == dir
(should list all (sub-)directories), this command is not recorded in the atuin db.
When I run atuin history last
after a command with a normal wildcard it shows:
2023-05-17 11:49:32 ls *.jpg 32ms
When I run atuin history last
after a double wildcard it shows:
2023-05-17 11:50:02 50ms (the command is empty)
I can confirm this issue
In nushell, anytime a double asterisk is used anywhere in a command, the command is not recorded with atuin
I think this is a bug in nushell and probably needs https://github.com/nushell/nushell/issues/9558 to be implemented.
Atuin isn't getting passed anything when **
is used in the command, so it will need some modification of the nushell code to pass the cmd correctly (below). I tried a few different methods myself but I suspect that there's something in nushell preventing it from working.
https://github.com/atuinsh/atuin/blob/b74ed756e2542d330be81ee841407fe263453d42/atuin/src/shell/atuin.nu#L7-L15