From 3c5bbcf5b99d2b7dc0cbba6d154328344633bd72 Mon Sep 17 00:00:00 2001 From: hqingyi Date: Fri, 27 Nov 2015 19:29:15 +0800 Subject: [PATCH] jump: add support for directories starting with a dot (#4661) Closes #4661 --- plugins/jump/jump.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 4f9134fcd..a21b7a181 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -29,14 +29,14 @@ unmark() { } marks() { - local max=0 - for link in $MARKPATH/*(@); do + local link max=0 + for link in $MARKPATH/{,.}*(@); do if [[ ${#link:t} -gt $max ]]; then max=${#link:t} fi done local printf_markname_template="$(printf -- "%%%us " "$max")" - 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 -- "$printf_markname_template" "$markname" @@ -45,13 +45,13 @@ marks() { } _completemarks() { - reply=("${MARKPATH}"/*(N:t)) + reply=("${MARKPATH}"/{,.}*(@N:t)) } compctl -K _completemarks jump compctl -K _completemarks unmark _mark_expansion() { - setopt extendedglob + setopt localoptions extendedglob autoload -U modify-current-argument modify-current-argument '$(readlink "$MARKPATH/$ARG")' }