zsh-workers
 help / color / mirror / code / Atom feed
ec59c03be664380cffe7ac097a0d7b5fcf3d9555 blob 504 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
#compdef getopts unset

# This will handle completion of keys of associative arrays, e.g. at
# `vared foo[<TAB>' could complete to `vared foo[key]'.

local ret=1

if [[ $PREFIX = *\[* ]]; then
  compstate[parameter]=${PREFIX%%(|\\)\[*}

  IPREFIX=${PREFIX%%\[*}\[
  PREFIX=${PREFIX#*\[}

  _subscript -q
else
  _parameters -g '^a*' "$@" && ret=0
  
  if compset -S '\[*'; then
    set - -S "" "$@"
  else
    set - -qS"${${QIPREFIX:+[}:-\[}" "$@"
  fi
  _parameters -g 'a*' "$@" && ret=0
  return ret
fi
debug log:

solving ec59c03 ...
found ec59c03 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).