LoginSignup
1
0

More than 5 years have passed since last update.

bashのプロンプトをはい,ご主人様?に変える

Last updated at Posted at 2018-02-09

~/.bashrc に以下を書く
古いのがある場合はコメントアウトしてください。すぐに元に戻せます。

PS1="\[\e[36m\e \u@\h \W\[\e[0;32m\]$\[\e[m\]\nYes, Master? $ " 
source ~/.bashrc 

で更新
するとこうなります。

Screen Shot 2018-02-10 at 0.34.59.png

Yes, Master?のところを好きに変えられます。
閉じ引用符 " の前は空白にした方が見やすいです。

日本語もおっけー

PS1="\[\e[36m\e \u@\h \W\[\e[0;32m\]$\[\e[m\]\nご注文は? $ "

Screen Shot 2018-02-10 at 0.59.36.png

はい,ご主人様? にする

PS1="\u@\h \W はい,ご主人様? \$ " 

Screen Shot 0030-03-02 at 17.06.15.png

色付きで二行

PS1="\[\e[36m\]\e \u@\h \W\[\e[31m\] \$\[\e[37m\]\nはい,ご主人様? \[\e[32m\]\$\[\e[m\] "

Screen Shot 0030-03-02 at 17.00.27.png

夢が広がりますね。

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