File tree 2 files changed +23
-0
lines changed
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Source: http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html
2
+ export MARKPATH=$HOME/.marks
3
+ function jump {
4
+ cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
5
+ }
6
+ function mark {
7
+ mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
8
+ }
9
+ function unmark {
10
+ rm -i "$MARKPATH/$1"
11
+ }
12
+ function marks {
13
+ ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
14
+ }
15
+
16
+ function _completemarks {
17
+ reply=($(ls $MARKPATH))
18
+ }
19
+
20
+ compctl -K _completemarks jump
21
+ compctl -K _completemarks unmark
Original file line number Diff line number Diff line change @@ -291,6 +291,8 @@ get_space () {
291
291
292
292
#{{{ Functions
293
293
294
+ source .zsh/marks
295
+
294
296
_force_rehash () {
295
297
(( CURRENT == 1 )) && rehash
296
298
return 1 # Because we didn't really complete anything
You can’t perform that action at this time.
0 commit comments