Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


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

ubuntu terminal directory



> From: Derek Martin
> Sent: Thursday, March 25, 2010 12:15 PM

> On Thu, Mar 25, 2010 at 09:12:39AM -0400, Dan Ritter wrote:
> > > > why take up 3/4 of the first line with my path.  i already know 
> > > > where i am...  
> 
> Because, sometimes you don't.  Like after being away from your
> terminal for a while.  :)

Yep!

I prefer the following for my csh: I have aliased the cd command as follows:

alias cd 'cd \!*; set a = `pwd`; set b = ${a:h}; set prompt = %U$HOSTN%u":%B"${b:t}"/"${a:t}"%b> "'

What does it do? My machine (host) name (the part before the colon) is underlined. And my current path is in bold. And my path is just the lowest two levels of the tree (not the whole path) since that's all I need to know to get my bearings 99% of the time. If I need more for a command, I can always do `pwd`/filename. My prompt looks as follows (the underline and bold text is not obviously visible below):

filc20190:npalit/.ssh2> 

So while scrolling, it is very easy to distinguish my prompt from the terminal I/O. And the abbreviated path does not take up the whole line. I personally do not like the full separate line for the path since it takes up too much screen real estate and I typically tend to look at my past history a lot. But that's what suits my style. Everyone's styles/requirements are different.

-Nilanjan







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org