补充 让 Shell 只显示当前路径

Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
ithink.chan 2019-07-30 15:10:06 +08:00
parent 8d908482e9
commit 058d458e9a
1 changed files with 10 additions and 0 deletions

View File

@ -125,3 +125,13 @@ groups <user name>
```sh ```sh
sudo apt-get install flashplugin-installer sudo apt-get install flashplugin-installer
``` ```
## 让 Shell 只显示当前路径
Shell 默认显示完整路径,有时候路径比较长就非常恼人,可以设置只显示当前目录名称,修改 /.bashrc将所有 PS1 对应的小写 w 改为大写 W 即可,例如:
```sh
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# \w\ 改为 \W\
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\W\$ '
```