Hacker News new | past | comments | ask | show | jobs | submit login

zsh has quote-line by default bound to alt-' which will escape your current command line:

  quote-line (ESC-’) (unbound) (unbound)

    Quote the current line; that is, put a ‘’’ character at the beginning and the end, and convert all ‘’’ characters to ‘’\’’’. 
http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html



After being disappointed that the `!:q:p` trick doesn't work, I'm even more delighted to see that esc-' does it inline! thanks ZSH!


You can do the same with bash:

!:q<ESC>^

(<ESC>^ is Escape Shift-6 in my keyboard)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: