#!/bin/bash #> CVS Info: ## $Id: gotodir.bash,v 1.1 2004/05/04 15:59:14 felipe Exp $ #> Author: ## Felipe Penno Saraiva #> Creation Date: ## 2004-05-04 12:36 #> Description: ## Get set of directories from file. #> Instalation Instructions: ## 1) Put this file anywhere you want and add dir to the PATH ## environment variable. ##+ export PATH=$PATH:/dir/chosen/by/you # ## 2) Add the following lines into your .bashrc file ##+ alias resetdir='rm -f ~/.dirlist' ##+ alias setdir='pwd >> ~/.dirlist' ##+ alias gotodir='cd `gotodir.bash`' # ## 3) Re-Read you .bashrc file ##+ cd; . .bashrc # ## 4) Start Using It! ## setdir: while you're in the directory where you will probably visit ## back later, run the aliased command 'setdir'. It will record the output ## of the 'pwd' command in a file. ## gotodir: will list all directories you set using 'setdir', then you press directory ## number and go. ## resetdir: deletes directory listing file. LOGFILE=$HOME/.dirlist select directory in `cat $LOGFILE`; do echo $directory exit 0 done; exit 0