Re:Fish: A user-friendly command line shell for macOS, Linux...
by zanchey on Wednesday December 13, 2017 @09:12AM
(#15914263)
A large number of electrons have been expended on this topic - see https://github.com/fish-shell/fish-shell/issues/4327 for a starting point. It doesn't seem there's a perfect answer here.
Re:Fish: A user-friendly command line shell for macOS, Linux...
by Aardwolf on Wednesday December 13, 2017 @05:12AM
(#15913299)
Heh 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)
Re:Fish: A user-friendly command line shell for macOS, Linux...
by pacoverdi on Wednesday December 13, 2017 @03:08AM
(#15912803)
This 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).
Re:Fish: A user-friendly command line shell for macOS, Linux...
by bgaluszka on Wednesday December 13, 2017 @03:59AM
(#15913010)
AFAIK it's not stored in history but also you can't go "up" and run it again which is what parent wants.
Re:Fish: A user-friendly command line shell for macOS, Linux...
by ideasman42 on Wednesday December 13, 2017 @04:34AM
(#15913137)
Right, only the last command is kept in memory. Run another command and it's lost (which is good IMHO)
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.