Commit d5701784 authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #2098 from monstermunchkin/master

jump plugin: fix autocompletion with single mark
parents d72ebc08 91b6a6b5
...@@ -38,7 +38,13 @@ marks() { ...@@ -38,7 +38,13 @@ marks() {
} }
_completemarks() { _completemarks() {
reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g')) if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g'))
else
if readlink -e "${MARKPATH}"/* &>/dev/null; then
reply=($(ls "${MARKPATH}"))
fi
fi
} }
compctl -K _completemarks jump compctl -K _completemarks jump
compctl -K _completemarks unmark compctl -K _completemarks unmark
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment