about summary refs log tree commit diff
path: root/Completion/Base/_brace_parameter
blob: 2bf7b6a6d46e5d66ef4df1d93601d797e6ab33e3 (plain) (blame)
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
26
27
28
29
30
31
#compdef -brace-parameter-

_parameters -e


# Without the `-e' option, we would use the following (see the file
# Core/_parameters for more enlightenment).

# setopt localoptions extendedglob

# local lp ls n q

# if [[ "$SUFFIX" = *\}* ]]; then
#   ISUFFIX="${SUFFIX#*\}}$ISUFFIX"
#   SUFFIX="${SUFFIX%%\}*}"
#   suf=()
# elif [[ "$LBUFFER" = *\$\{[^}]#\$\{[^}]#$PREFIX ||
#         "$compstate[insert]" = *menu* ]]; then
#   suf=(-b '')
# else
#   suf=(-b ' ')
# fi

# lp="$LBUFFER[1,-${#PREFIX}-1]"
# ls="$RBUFFER[${#SUFFIX}+1,-1]"
# n=${(M)#ls##\"#}
# q=${(M)lp%%\"#}

# [[ n -gt 0 ]] && suf=''

# _parameters "$suf[@]" -Qs "${q[1,-n-1]}" -r '-:?#%+=[/}'