dotfiles, initial commit
[dotfiles] / .bash_marks
1 #!/bin/sh
2
3 # where all marks will be stored
4 export MARKPATH=$HOME/.marks
5
6 function jump {
7 cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
8 }
9
10 function mark {
11 mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
12 }
13
14 function unmark {
15 rm -i "$MARKPATH/$1"
16 }
17
18 function marks {
19 ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
20 }