ZSH tip: handling URLs with url-quote-magic

The awesome Z Shell lets you forget about the quoting headeaches some URLs would cause. Its url-quote-magic line editing plugin automatically quotes metacharacters like question marks, quotes and ampersands while you type or paste them.

You just have to enable it in your .zshrc (after installing ZSH, of course):

autoload -U url-quote-magic
zle -N self-insert url-quote-magic

Comments

  1. tuXXX
    March 25th, 2009 | 10:00 pm

    Thanks! That’s exactly what I needed!
    For me, it’s really useful for ampersand in urls!

  2. IL
    July 25th, 2010 | 1:05 am

    Yes! Thanks!

Leave a reply