LoginSignup
14
11

More than 5 years have passed since last update.

ZSHのPROMPTの先頭にホスト名を追加する

Last updated at Posted at 2012-12-26

oh-my-zshで、PROMPTに追記する必要があったのでメモ。

export PROMPT="%{$fg_bold[blue]%}${HOST} $PROMPT"

と .zshrc 等に設定すると

ss 2014-06-12 15.30.32.png

という感じで $HOST が頭につく。

画面の右端に表示するならこうかな?

export RPROMPT="%{$fg_bold[blue]%}${HOST}"
14
11
1

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
14
11