0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

zshでURLコピペ時にバックスラッシュ補完が効くのをやめさせる

Posted at

misc.zshの特定部分をコメントアウトする

autoload,zleと書いてある部分をコメントアウトすればOK。(自分のターミナルからコピペしたのでいらない文字が混ざってます)
zshの場合、コメントアウトは半角シャープでOKです。

~/.oh-my-zsh/lib/misc.zsh
  3 # *-magic is known buggy in some versions; disable if so
  4 if [[ $DISABLE_MAGIC_FUNCTIONS != true ]]; then
  5   for d in $fpath; do
  6   ▸-if [[ -e "$d/url-quote-magic" ]]; then
  7   ▸-▸-if is-at-least 5.1; then
  8 #  ▸▸-▸-autoload -Uz bracketed-paste-magic
  9 #  ▸▸-▸-zle -N bracketed-paste bracketed-paste-magic
 10   ▸-▸-fi
 11 #  ▸▸-autoload -Uz url-quote-magic
 12 #  ▸▸-zle -N self-insert url-quote-magic
 13       break
 14   ▸-fi
 15   done
 16 fi

ターミナル再起動し、URLをコピペしてバクスラが入らないことを確認

参考

How to disable magic plugins · Issue #5569 · robbyrussell/oh-my-zsh

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?