diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index a3c5cf8c..5096879d 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -38,7 +38,13 @@ marks() { } _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 unmark