Csh prompt
Dean Karres
dean at usceast.UUCP
Fri Feb 10 15:24:37 AEST 1989
In article <35782 at bbn.COM> sboisen at bbn.com writes:
>>In article <739 at umb.umb.edu> pme at umb.edu (Paul English) writes:
>>>...
>>> alias . echo `hostname`: `dirs`
>>...
>My solution is to put only the last part of the directory into the
>prompt:
I came across this posting this evening so if my suggestion has
already been posted and rejected please forgive :-)
On the BSD/Ultrix/SUN OS boxes that I deal with my prompt is set as
follows:
set host = `hostname`
set prompt = "$host - `pwd`\
% "
alias cd 'cd \!*; set prompt = "$host - `pwd`\\
% "'
alias po 'popd; set prompt = "$host - `pwd`\\
% "'
alias pu 'pushd \!*; set prompt = "$host - `pwd`\\
% "'
This gives me the ability to have complete, though potentially long,
paths showing that do not interfear with my command line. The general
effect is:
monster - /usr/local/not-so-local/.../.../.../.../.../.../...
%
I do the "set host = `hostname`" because I think that the variable
substitution is "faster" than the "hostname" evaluation. I do not know
this for a fact.
Dean...k...
--
Dean Karres
US-Mail: Math & Stat Comp Cntr, Math Dept, USC, Columbia, SC 29208
E-Mail: ...{gatech!hubcap, mcnc!ece-csc}!ncrcae!usceast!dean
- or -: relay.cs.net!cs.scarolina.edu!dean
--
E-Mail: ...{gatech!hubcap, mcnc!ece-csc}!ncrcae!usceast!dean
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Adaz sighed, "So how long will this trip take?"
"A month?" Sutekh shrugged. "Depends on when the horses die."
More information about the Comp.unix.wizards
mailing list