blob: de5daddc241164b0344d03cbf522b40199259430 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/bin/sh
# cdabbr :: opens the `cdabbr` document for editing and reloads abbreviations
# cdabbr ls :: cats out the document
# cdabbr ::
[ -z "$EDITOR" ] && echo "EDITOR not set" && exit
[ "$1" = "ls" ] && cat "$HOME/cdabbr" && exit 0
$EDITOR "$HOME/cdabbr"
while read a c ; do
alias "cd$a"="cd $c"
done <<< "$(cat "$HOME"/cdabbr)"
|