1
2

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 3 years have passed since last update.

Macのzshを改造する

Posted at

Homebrewでzsh関連インストール

terminal
brew update
brew install zsh
brew install zsh-completions
brew install zsh-autosuggestions
brew install zsh-syntax-highlighting

zshをデフォルトに設定

terminal
chsh -s /bin/zsh

.zshrcに以下追加

.zshrc
path=(/path/to/homebrew/share/zsh-completions $fpath)

autoload -U compinit
compinit -u

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh

ターミナルを開くたびに聞かれる。

zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]?

以下のコマンドで出てくるパスを出力する。

terminal
compaudit

出力されたパスに対して権限変更する。

terminal
chmod 755 /usr/local/share
chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions

以上

1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?