atuin icon indicating copy to clipboard operation
atuin copied to clipboard

nushell: Commands using double wildcards are not recorded correctly

Open freijon opened this issue 1 year ago • 3 comments

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)

freijon avatar May 17 '23 11:05 freijon

I can confirm this issue

kiil avatar Jun 17 '23 17:06 kiil

In nushell, anytime a double asterisk is used anywhere in a command, the command is not recorded with atuin

kiil avatar Jul 23 '23 18:07 kiil

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

arcuru avatar Oct 23 '23 21:10 arcuru