5 ms·
!! is not specific to fish. It is a history feature to get the last command. It's like using '!ec' for getting the last command that starts with 'ec'. Using `!!
by bellbind 15y ago
!! is not specific to fish. It is a history feature to get the last command. It's like using '!ec' for getting the last command that starts with 'ec'. Using `!!` is not "getting output of previous command", it is re-executing it and getting that output.
For that alt+. tip, I'd use the special $_ var.
- crazydiamond 15y agoYou haven't told me how to do a `!!` in fish. (I do understand that it re-executes the previous command). I am used to using this in other shells like bash and zsh, and would like to know if there's some way of doing it in fish.
- bellbind 15y agoAFAIK this is not possible with fish, as variables cannot be used as commands like in bash (and the ! history feature does not exist in fish, it is designed to be fully interactive). See http://fishshell.com/user_doc/faq.html#faq-history http://fishshell.com/user_doc/faq.html#faq-history