Prompt as Current Directory?

Chip Salzenberg chip at ateng.com
Tue Nov 21 11:18:53 AEST 1989


According to rmg at ultra.com (Rich Geiger):
>Somehow
>  /usr/baziotes/projs/releases/source/lint/obj/debug/notes/private %
>as a prompt is somewhat irritating. Doesn't leave much space for
>typing a command, either!

Right.  That's why I've got the last two components of the path in my
prompt.  Using tcsh:

   alias precmd 'set _h=${cwd:h}; set prompt="%m {${_h:t}/${cwd:t}} % "'

-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg at A T Engineering;  <chip at ateng.com> or <uunet!ateng!chip>
    "Did I ever tell you the Jim Gladding story about the binoculars?"



More information about the Comp.unix.questions mailing list