Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (68 sloc) 3.37 KB
Working Directory
* Developed by Karlin Fox at Atomic Object
* With help and advice by David Crosby
Requires bash and perl.
Working Diectory (wd) is a system of scripts and aliases that allows named
storage of directories, as well as quick retrieval of previously stored
directories. It has support for multiple schemes of working directories.
The easiest way to install (except the man page, see below) is just:
$ ./
This will put the necessary files in "$HOME/.wd". If you want it somewhere
else, just put the files in the 'wd' directory of the package wherever
you want. Then add the following lines to your .bashrc file (or appropriate
equivalent thereof.)
export WDHOME=$HOME/.wd
source ~/.wd/
Note that there is a man page included. This file is not installed because
of platform inconsitency. Please copy this file (wd.1.gz) to your man page
directory. For linux, that is usually /usr/share/man/man1 or similar.
There are 10 slots, 0 thru 9. Slot 0 is the default (implied slot).
'wdl' lists the contents of the current scheme's slots.
Some examples:
wdl Display all slot contents
wds Store the current working directory in the default slot (slot 0)
wds1 Store the current working directory in slot 1 (etc, etc)
wd Jump to the default directory (slot 0)
wd1 Jump to the directory in slot 1 (etc, etc)
wdc Clear all slots
Slot contents are stored in a file, wd.list, so they will persist from session
to session.
*NOTE*: This also means that all shells share the same slot configuration;
changes in one will be reflected in the other. This is a feature.
Another command, 'wdenv', will copy all of your current working directories
into corresponding environment variables for inline use. For example:
$ cd /home/junk
$ wds1
$ wdenv
$ echo $WD1
You can have as many schemes as you'd like. To change schemes, simply say
$ wdscheme myscheme
...where 'myscheme' is some label for your scheme. If the scheme file already
existed, it will save your previous wd.list to your previous .scheme file and
switch to using the new one (by changing the contents of currentscheme.)
If the scheme was new, a new .scheme file is created in $WDHOME and the new
scheme's name is recorded in the $WDHOME/currentscheme file.
Please report any to me!
Working Directory is unique in its schemes and quick aliases, but there are more generic directory management and bookmarking tools out there:
* CDargs:
* apparix:
Working Directory is licensed under the GPL:
Working Directory is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Working Directory is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Stratagem; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA