LoginSignup
9
9

More than 5 years have passed since last update.

[Mac] zsh のgitコマンド等での補完を強力にする

Posted at

何が嬉しい?

git コマンドで言うと

  • git [タブ・キー] って押すと補完候補がでるよ!
  • git config [タブ・キー]押しても候補がでるよ!
  • もちろん補完もする

zsh-completions をインストール

homebrewの場合

brew install zsh-completions

.zshrc に以下を追加

fpath=(/usr/local/share/zsh-completions $fpath)

zcompdump を強制リビルド

rm -f ~/.zcompdump; compinit

"zsh compinit: insecure directories"というwarningが出たら

chmod go-w /usr/local/share

ユーザ作成の補完を設定

zsh-users の補完を入れる?

上記の brew install zsh-completions で入っているらしい!

以下のコマンドとかやらなくていいよ!

git clone https://github.com/zsh-users/zsh-completions.git

理由は、以下から(英語)
zsh-users/zsh-completions

参考

日本の場合以下より!

zshの補完をさらに強力にするzsh-completionsの設定 - Guyon Diary

9
9
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
9
9