rwxr--r--
/dev/blog

Bez Hermoso, Software Engineer @ Square

History expansion in the shell can be a huge productivity-booster. In zsh, the expansion can be previewed by hitting the Tab key. This isn’t true in bash.

To get a preview of history expansions in bash:

 
setopt -s histverify

With this, hitting the Return key will result in the the expansion being entered into the prompt to be reviewed or edited further if necessary instead of being executed immediately.

To learn more about history expansion, consult man history.

comments powered by Disqus