From 35133507e696c0cc4dbeb31b83b67ae30e8a36d7 Mon Sep 17 00:00:00 2001 From: hqingyi Date: Fri, 27 Nov 2015 19:29:15 +0800 Subject: [PATCH] change: add dot-start directories support for jump plugin. --- plugins/jump/jump.plugin.zsh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index e58e7373..b78c800b 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -28,7 +28,7 @@ unmark() { } marks() { - for link in $MARKPATH/*(@); do + for link in $MARKPATH/@(*|.*)(@); do local markname="$fg[cyan]${link:t}$reset_color" local markpath="$fg[blue]$(readlink $link)$reset_color" printf "%s\t" $markname @@ -37,13 +37,7 @@ marks() { } _completemarks() { - if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then - reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g')) - else - if readlink -e "${MARKPATH}"/* &>/dev/null; then - reply=($(ls "${MARKPATH}")) - fi - fi + reply=($(find $MARKPATH -type l | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*)$/\2/g')) } compctl -K _completemarks jump compctl -K _completemarks unmark