macのターミナルを変えた話
参考
自分がやったことのメモ
ターミナルのテーマ
"Iceberg"を導入した。
というかすでに導入してたっぽい。
シェルをbashからzshへ変更
macにデフォルトで入っている /bin/zsh
ではなく、
ひとまず、最新を導入した。
(1) zshをインストール
$ brew update
$ brew install zsh
(2) /etc/shells
にzshのパス /usr/local/bin/zsh
を追加。
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
# 追加
/usr/local/bin/zsh
(3) ログインシェルを変更
$ chsh -s /usr/local/bin/zsh
プロンプトを変更
(1) 以下のコマンド2つを実行
$ git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
$ setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
(2) zstyle ':prezto:module:prompt' theme 'sorin'
の theme
の箇所を pure
にします。
:prezto:module:prompt
という文字列をエディタで検索して、 Prompt
の設定場所を探してください。
#
# Prompt
#
# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
zstyle ':prezto:module:prompt' theme 'pure'
(3) 'syntax-highlighting' \
と 'autosuggestions' \
を 'prompt' \
の上に記載する
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'syntax-highlighting' \
'autosuggestions' \
'prompt' \
nodeを入れている場合
環境パスを通す
nodeが使えるように環境パスを通す。
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.bash_profile
zshを初めて使う場合に、nodeのバスが通っていないので、npmとか使えなくなるので通します。
zshの場合
echo 'export PATH=$HOME/.nodebrew/current/bin:$PATH' >> ~/.zprofile
Author And Source
この問題について(macのターミナルを変えた話), 我々は、より多くの情報をここで見つけました https://qiita.com/oyan29/items/ec4a7576ebb2acfda989著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .