Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.39k stars 226 forks source link

Error when closing broot (from 'br') in nushell (due to a deprecated instruction) #821

Closed LudoPinelli closed 6 months ago

LudoPinelli commented 6 months ago

Hello,

In nushell, I used broot --install to install the function to use br. It works, but I have the following error when using Alt+Enter or :ol on a directory:

Error:   × Automatically spreading lists is deprecated
    ╭─[/home/ludo/.config/local/share/broot/launcher/nushell/5:90:1]
 90 │     if ($file == null) {
 91 │         ^broot --outcmd $cmd_file $args
    ·                                       ──┬──
    ·                                         ╰── Spreading lists automatically when calling external commands is deprecated and will be removed in 0.91.
 92 │     } else {
    ╰────
  help: Use the spread operator (put a '...' before the argument)

IO Error : No such file or directory (os error 2)
rm: remove '/tmp/broot-l07IrDYjxsJHvvbGILs2t7ZAx.tmp'? :

I forked broot and made the changes at line 91 of the nushell.rs file as suggested in the error, rebuilt and launched broot --install to apply the changes. It kind of works since I don't have the error anymore, but I still have this each time:

rm: remove '/tmp/broot-kEZNGdquPgUB5Onv3CcJAa1CO.tmp'? :

And, I don't know what I can do at this point ^^

LudoPinelli commented 6 months ago

It happens that the rm: remove... is not related to the error nushell throws, but just because the nushell launcher use rm and I have alias rm = rm -rfi in my config...

I'll make a PR that fix the error.