Shell prompts are often designed to provide a reminder of useful context information such user name, host and current directory:
PS1="\u@\h:\w\$" tanguy@muscat:~/public_html$
Such a prompt is sufficient to serve its original purpose, but it can be enhances in at least one useful way. Sometimes you have to copy the path of the current directory: with this prompt, it means selecting it by precisely dragging the mouse over it. Well, by adding spaces around the current directory you can become able to select it with a simple double click:
PS1="\u@\h: \w \$" tanguy@muscat: ~/public_html $
Indeed, with such a prompt, you can now roughly point to the path, double click, and let your terminal emulator's word detection feature select the whole path for you. This simple modification may save you several tenths of seconds!
10 comments
sunday 25 september 2011 à 19:56 ao2 said : #1
sunday 25 september 2011 à 21:44 Stuart Prescott said : #2
sunday 25 september 2011 à 23:17 Anonymous said : #3
monday 26 september 2011 à 06:28 Alexander E. Patrakov said : #4
monday 26 september 2011 à 13:46 jhr said : #5
tuesday 27 september 2011 à 15:02 mirabilos said : #6
tuesday 27 september 2011 à 18:02 -dsr- said : #7
friday 30 september 2011 à 23:26 Axel said : #8
wednesday 05 october 2011 à 10:26 lorexvii said : #9
wednesday 05 october 2011 à 10:27 lorexvii said : #10