[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash prompt help

From: Mihamina Rakotomandimby
Subject: bash prompt help
Date: Mon, 13 Feb 2012 13:55:45 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0

Hi all,

Running Bash 4.2.20, I would like to have a prompt composed by the first letters of the base path, excluding the last one.

- /u/l/bin if I'm in /usr/local/bin
- /v/w/h/my-website if I'm in /var/www/html/my-website
- /h/mihamina if I'm in /home/mihamina

Of course, this could lead to some errors and confusion, but it's useful for my particular use case, and if I want to explicitely print the current directory, I'll just have to "cwd".

Thank you.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]