1
0

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.

プロンプトの表示を短く表示

1
Last updated at Posted at 2021-08-11

wsl やターミナルのプロンプト表示を短くしたい。
$cd ~ で移動して。 そこにある.bashrc 内にある下記の文を編集。
\w(小文字)を\W(大文字)にする!

(.bashrc)
export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '

参考:
https://www.softel.co.jp/blogs/tech/archives/2659

http://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#:~:text=The%20basename%20of%20%24PWD%2C%20with%20%24HOME%20abbreviated%20with%20a%20tilde.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?