PS1='$NAME@$PWD'
and the path is deep, the line is almost covered by path name. You can just show the deepest folder by
PS1='$NAME@$(PWD##*/)'
If you need last three folder name, you need some complicated code like the following:
function ncd {
cd "$*"
PS1=$(echo $NAME@$PWD|awk -F'/' '{printf("%s/",$1);for(i=2;i< NF ; i++) {if(i
}
alias cd=ncd
No comments:
Post a Comment