Skip to content

Commit

Permalink
Filter out missing links with jump autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinAiken committed Sep 5, 2013
1 parent 73c22c1 commit 128cd3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/jump/jump.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
# marks: lists all marks
#
export MARKPATH=$HOME/.marks
function jump {
function jump {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
}
function mark {
function mark {
mkdir -p "$MARKPATH"; ln -s "$(pwd)" $MARKPATH/$1
}
function unmark {
function unmark {
rm -i "$MARKPATH/$1"
}
function marks {
ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
}

function _completemarks {
reply=($(ls $MARKPATH))
reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([a-z]*):$/\2/g'))
}

compctl -K _completemarks jump
Expand Down

0 comments on commit 128cd3f

Please sign in to comment.