From a suffering BSD user...
der Mouse
mouse at mcgill-vision.UUCP
Tue Dec 10 07:07:00 AEST 1985
> # oh the pain the pain.
> alias cd 'cd \!*; set prompt="$cwd:t[\\!] "'
somewhere[33] cd foo
foo[34] cd /
[35] cd ~/foo
foo[36] pushd ../bar
foo[37] pwd
/some/where/bar
foo[38]
Maybe you'd rather have /[35]? Maybe you'd like pushd and popd to work?
Try
alias cd 'cd \!* ; fixprompt'
alias pushd 'pushd \!* ; fixprompt'
alias popd 'popd \!* ; fixprompt'
alias fixprompt \
'if $cwd:q == "/" set prompt = '\''/[\\!] '\'' ; '\
'if $cwd:q != "/" set prompt = "$cwd:t"'\''[\\!] '\'
--
der Mouse
USA: {ihnp4,decvax,akgua,etc}!utcsri!mcgill-vision!mouse
philabs!micomvax!musocs!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
mcvax!seismo!cmcl2!philabs!micomvax!musocs!mcgill-vision!mouse
Hacker: One who accidentally destroys /
Wizard: One who recovers it afterward
More information about the Comp.unix
mailing list