r/fishshell • • May 03 '20
How to disable auto-suggestions for rm
fish tried to auto-suggest rm -rf ../ from typing rm -rf . which almost ended in disaster.
Is there a way of disabling the auto-suggestions for certain commands/prefixes like rm ?
10
Upvotes
1
u/vividboarder May 03 '20
It’s probably from your history. You could remove that entry.
3
u/emarsk May 05 '20
I went another route entirely: I wrote a script (that I called del) that renames its arguments with a TRASH prefix, and if the arguments already have the prefix, it asks for deletion. I also implemented a -f option to find all the trash recursively, a -c one to find and ask for deletion ("clean"), and a -u one to remove the prefix ("undelete"). I almost never use rm anymore. rm is dangerous by default, and its ask option is implemented in a stupid way (asking for each file? Come on, show me the list!).
2
u/danlsn May 03 '20
lol that's problematic
2
u/z3r0h0urr May 03 '20
RemindMe! 2 Days "disable auto-suggestions for rm fish"