dotfiles/shell/save-directory.sh

11 lines
275 B
Bash
Raw Normal View History

2010-06-29 22:20:19 +10:00
if [ ! -f ~/.dirs ]; then
touch ~/.dirs
fi
alias show='cat ~/.dirs'
save (){
command sed "/!$/d" ~/.dirs > ~/.dirs1
mv ~/.dirs1 ~/.dirs; echo "$@"=\"`pwd`\" >> ~/.dirs
source ~/.dirs
}
2010-06-29 22:28:46 +10:00
source ~/.dirs # Initialization for the above 'save' facility: source the .dirs file