3 ms·
While I like fish, I stopped using it because of a small convenience feature ZSH has. With ZSH, I can run a command with a space at the start so it's excluded
by ideasman42 9y ago
While I like fish, I stopped using it because of a small convenience feature ZSH has.
With ZSH, I can run a command with a space at the start so it's excluded from history, even though its not saved to disk, the last command is still stored in memory so I can press Up to access it again.
This is handy when a mistake is made in the command means I need to run it again with some small change.
- zanchey 9y agoA large number of electrons have been expended on this topic - see https://github.com/fish-shell/fish-shell/issues/4327 https://github.com/fish-shell/fish-shell/issues/4327 for a starting point. It doesn't seem there's a perfect answer here.
- pacoverdi 9y agoThis feature seems to exist also in bash. I discovered it accidentally while wondering why my history did not include my last commands (copy/pasted with a leading space).
- bgaluszka 9y agoAFAIK it's not stored in history but also you can't go "up" and run it again which is what parent wants.
- ideasman42 9y agoRight, only the last command is kept in memory. Run another command and it's lost (which is good IMHO)
- Aardwolf 9y agoHeh I have the opposite preference, I use space to ensure when pressing up it will not bring up that command, to not mistakingly run it when muscle memory will expect another command there (for mv and rm commands mostly)