mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
moved to Completion/Zsh/Context/_tilde
This commit is contained in:
parent
579339493a
commit
2cb2aa16d0
@ -1,30 +0,0 @@
|
|||||||
#compdef -tilde-
|
|
||||||
|
|
||||||
# We use all named directories and user names here. If this is too slow
|
|
||||||
# for you or if there are too many of them, you may want to use
|
|
||||||
# `compadd -qS/ -a friends' or something like that.
|
|
||||||
|
|
||||||
[[ -n "$compstate[quote]" ]] && return 1
|
|
||||||
|
|
||||||
local expl suf dirs list lines revlines i ret disp nm="$compstate[nmatches]"
|
|
||||||
|
|
||||||
if [[ "$SUFFIX" = */* ]]; then
|
|
||||||
ISUFFIX="/${SUFFIX#*/}$ISUFFIX"
|
|
||||||
SUFFIX="${SUFFIX%%/*}"
|
|
||||||
suf=(-S '')
|
|
||||||
else
|
|
||||||
suf=(-qS/)
|
|
||||||
fi
|
|
||||||
|
|
||||||
_tags users named-directories directory-stack
|
|
||||||
|
|
||||||
while _tags; do
|
|
||||||
_requested users && _users "$suf[@]" "$@" && ret=0
|
|
||||||
|
|
||||||
_requested named-directories expl 'named directory' \
|
|
||||||
compadd "$suf[@]" "$@" -k nameddirs
|
|
||||||
|
|
||||||
_requested directory-stack && _popd "$suf[@]" && ret=0
|
|
||||||
|
|
||||||
(( ret )) || return 0
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user