1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

zsh-workers/9731

This commit is contained in:
Tanaka Akira 2000-02-15 09:07:09 +00:00
parent bf990125d1
commit e6cc1ece7f
24 changed files with 82 additions and 112 deletions

View file

@ -17,9 +17,8 @@ if (( long )); then
fi
name=${~words[1]}
if [[ "$name" != /* ]]; then
tmp="$PWD/$name"
fi
[[ "$name" != /* ]] && tmp="$PWD/$name"
name="_args_cache_${name}"
name="${name//[^a-zA-Z0-9_]/_}"
@ -255,7 +254,7 @@ if (( $# )) && comparguments -i "$autod" "$@"; then
fi
if [[ -z "$matched" ]] && _requested options &&
{ ! zstyle -t ":completion:${curcontext}:options" prefix-needed ||
{ ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
[[ "$origpre" = [-+]* ||
( -z "$aret$mesg" && nm -eq compstate[nmatches] ) ]] } ; then
local prevpre="$PREFIX" previpre="$IPREFIX"

View file

@ -16,7 +16,7 @@ fi
_tags "$_type" || return 1
zstyle -t ":completion:${curcontext}:$_type" verbose && _showd=yes
zstyle -T ":completion:${curcontext}:$_type" verbose && _showd=yes
_description "$_type" _expl "$1"
shift

View file

@ -5,12 +5,12 @@ local expl disp jobs job jids pfx='%' desc how
_tags jobs || return 1
if [[ "$1" = -t ]]; then
zstyle -t ":completion:${curcontext}:jobs" prefix-needed &&
zstyle -T ":completion:${curcontext}:jobs" prefix-needed &&
[[ "$PREFIX" != %* && compstate[nmatches] -ne 0 ]] && return 1
shift
fi
zstyle -t ":completion:${curcontext}:jobs" prefix-hidden && pfx=''
zstyle -t ":completion:${curcontext}:jobs" verbose && desc=yes
zstyle -T ":completion:${curcontext}:jobs" verbose && desc=yes
if [[ "$1" = -r ]]; then
jids=( "${(@k)jobstates[(R)running*]}" )

View file

@ -21,7 +21,7 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then
while _tags; do
if _requested -V indexes expl 'array index'; then
ind=( {1..${#${(P)${compstate[parameter]}}}} )
if zstyle -t ":completion:${curcontext}:indexes" verbose; then
if zstyle -T ":completion:${curcontext}:indexes" verbose; then
list=()
for i in "$ind[@]"; do
[[ "$i" = ${PREFIX}*${SUFFIX} ]] &&

View file

@ -22,9 +22,9 @@ while _tags; do
compadd "$suf[@]" "$expl[@]" "$@" - "${(@k)nameddirs}"
if _requested -V directory-stack expl 'directory stack' &&
{ ! zstyle -t ":completion:${curcontext}:directory-stack" prefix-needed ||
{ ! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed ||
[[ "$PREFIX" = [-+]* || nm -eq compstate[nmatches] ]] }; then
if zstyle -t ":completion:${curcontext}:directory-stack" verbose; then
if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then
integer i
lines=("${PWD}" "${dirstack[@]}")