Skip to content

Random-access directory storage for Bash. Navigate deep project hierarchies super fast. The root of your current project is just a 'wd' away.

License

Notifications You must be signed in to change notification settings

baconpat/working-directory

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Working Directory

* Developed by Karlin Fox at Atomic Object (http:https://atomicobject.com)
* With help and advice by David Crosby

Requires bash.

Working Diectory (wd) is a simple set of aliases and functions for bash that
allows named storage of directories, as well as quick retrieval of
previously stored directories. It has support for multiple schemes of working
directories.


-- INSTALLATION

The easiest way to install (except the man page, see below) is just:

  $ ./install.sh

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/wd.sh

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.

				
-- USAGE

There are 10 slots, 0 through 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.

A set of environment variables named after the slots ($WD0, $WD1,
etc.) are created an updated as you modify the slots.

-- SCHEMES

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 clone your current slots to the new scheme file and switch to
it.
	
If the scheme was new, a new .scheme file is created in $WDHOME and the new
scheme's name is recorded in the $WDHOME/current_scheme file.


-- BUGS
 Please report any to me!
 karlinfox_yahoo_com

-- SIMILAR PROJECTS

Working Directory is unique in its schemes and quick aliases, but there are
more generic directory management and bookmarking tools out there:

* CDargs: http:https://www.skamphausen.de/cgi-bin/ska/CDargs
* apparix: http:https://micans.org/apparix

Attention zsh users! You can still use wd but you'll have to use the legacy
version written in sh and perl, wd-1.12

-- LICENSE
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
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Working Direcory; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

About

Random-access directory storage for Bash. Navigate deep project hierarchies super fast. The root of your current project is just a 'wd' away.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%