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:
parent
bf990125d1
commit
e6cc1ece7f
24 changed files with 82 additions and 112 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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*]}" )
|
||||
|
|
|
|||
|
|
@ -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} ]] &&
|
||||
|
|
|
|||
|
|
@ -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[@]}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue