To know, what is my CWD in console, I added the following to ~/.bash_profile:
export PS1='$(pwd)$ '
pwd result it shown before the
$ symbol. It was very nice.
But when I go to a directory with a long name:
In the command prompt I see:
This makes the shell almost impossible to work with. Is it possible to trim it, keeping only the last part or the dir name? Say, 30 characters.
Or, maybe the better idea would be to print the
pwd after every
cd command, so I could know, where I am? This can be done using an alias.