User Tools

Site Tools


bash:prompt:trim_long_directory_paths

BASH - Prompt - Trim Long Directory Paths

cd /usr/lib/systemd/user/sockets.target.wants

shows the prompt as:

bigmamba:/usr/lib/systemd/user/sockets.target.wants$ 

Configure bash to display only the last two directories of the path

export PROMPT_DIRTRIM=2

now shows the prompt as:

bigmamba:.../user/sockets.target.wants$
bash/prompt/trim_long_directory_paths.txt · Last modified: 2021/01/30 14:27 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki