Sometimes I see that the current working directory in shell prompt is abbreviated and sometimes not.
For example /usr/bin
will be displayed as bin$
or /folder1/folder2
displayed as folder2$
, in other cases I have seen /folder1/folder2
displayed as full /folder1/folder2$
I am using default terminal settings (I am using Fedora 22 virtual machine for learning, but I also notice this fact in several other tutorial videos using different distro)
Is there any rule?
Best Answer
Another way to shorten the path, if you use
\w
is with thePROMPT_DIRTRIM
shell variable. A demo: