I am using zsh
with oh-my-zsh
on Ubuntu:14.04.
The shell autocompletes escape character with backslash when I paste a URL.
For example with environment variables:
$ wget http://{DEFAULT_IP}/index.html
It will become:
$ wget http://\{DEFAULT_IP\}/index.html
How can I disable this function?
This is a bug in zsh 5.1.1 ~ 5.2(current).
The plugin
bracketed-paste-magic
did not works in the zsh versions.The issue is here:
I suggest you disable
bracketed-paste-magic
.Comment these code from oh-my-zsh's
~/.oh-my-zsh/lib/misc.zsh
solve the problem:via
If the URL is not quoted, the backslashes may be necessary, that's why zsh adds them (via
url-quote-magic
). If you do not like them, then quote the URL:then paste the URL and type the ending quote:
To disable the
url-quote-magic
feature entirely:EDIT: As of version 5.1, zsh supports bracketed paste in some terminals, in which case
url-quote-magic
is no longer involved (bracketed-paste-magic
replaces it for pastes).