set work dir aliases (4.[23] only)

Jerry Peek jerryp at tektools.UUCP
Tue Feb 18 05:54:55 AEST 1986


In article <73 at cselt.UUCP> marco at cselt.UUCP (Marco Mercinelli) writes:
> These two aliases allow to set a directory as a default work directory,
> so you it can be accessed immediatly.
> Passing arguments you can select more than one work directory
> (only for 4.[23] sites because of the symbolic link)
> 
> alias setwork   'rm -f ~/.wrk."\!*"; ln -s `pwd` ~/.wrk."\!*"'
> alias work	'cd ~/.wrk."\!*";echo "work dir: `pwd`"'

Nice idea.  It's better than using shell variables to save the directory names
because the symlinks stay around after you log out.

Here's one more alias.  It lists the working directories that you've
accumulated.  Colrm chops off the permissions, date, etc.  You'll have to
change the second colrm argument from 62 to whatever works with your
home-directory path.

alias listwork 'ls -l ~/.wrk.* | colrm 1 62'

Example:

% listwork
dev -> /class/devd1
make -> /tc1/jerryp/training/make/labs

% ls -l ~/.wrk*
lrwxr-xr-x  1 jerryp         12 Feb 17 08:45 /tc1/jerryp/.wrk.dev -> /class/devd1
lrwxr-xr-x  1 jerryp         30 Feb 17 08:45 /tc1/jerryp/.wrk.make -> /tc1/jerryp/training/make/labs


--Jerry Peek, Tektronix, Inc.
US Mail:    MS 74-222, P.O. Box 500, Beaverton, OR 97077
uucp:       {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp
CS,ARPAnet: jerryp%tektools at tektronix.csnet
Phone:      +1 503 627-1603



More information about the Comp.sources.unix mailing list