zsh-workers
 help / color / mirror / code / Atom feed
f6e65f99bac2ffc648577c2706d1adf5c52f7a91 blob 1260 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
26
27
28
29
30
 
#compdef getopt ggetopt

local curcontext=$curcontext
local -a context line state state_descr args aopts
local -A opt_args

# Note: BusyBox getopt is borrowed straight from util-linux, so they're
# basically identical
if _pick_variant busybox=BusyBox util-linux='getopt*enhanced' unix --version; then
  args=(
    '(-a --alternative)'{-a,--alternative}'[allow long options with single -]'
    '(: -)'{-h,--help}'[display help information]'
    '*'{-l+,--longoptions=}'[specify long options]:long options'
    '(-n --name)'{-n+,--name=}'[specify program name]:program name'
    '(1 -o --options)'{-o+,--options=}'[specify short options]:short options'
    '(-q --quiet)'{-q,--quiet}'[suppress getopt(3) error messages]'
    '(-Q --quiet-output)'{-Q,--quiet-output}'[suppress normal output]'
    '(-s --shell)'{-s+,--shell=}'[specify shell quoting conventions]:shell:(bash csh tcsh sh)'
    '(: -)'{-T,--test}'[test for enhanced getopt]'
    '(-u --unquoted)'{-u,--unquoted}'[do not quote output]'
    '(: -)'{-V,--version}'[display version information]'
    '(-o --options)1: :_guard "^-*" "short options"'
    '*:argument'
  )
  [[ -n $POSIXLY_CORRECT ]] && aopts+=( -A '-*' )
else
  args=( '1:short options' '*:argument' )
fi

_arguments -s -S $aopts : $args
debug log:

solving f6e65f99b ...
found f6e65f99b in https://inbox.vuxu.org/zsh-workers/0ED247D6-B6E3-40AB-A59D-DDEFC4083BEE@dana.is/

applying [1/1] https://inbox.vuxu.org/zsh-workers/0ED247D6-B6E3-40AB-A59D-DDEFC4083BEE@dana.is/
diff --git a/Completion/Unix/Command/_getopt b/Completion/Unix/Command/_getopt
new file mode 100644
index 000000000..f6e65f99b

Checking patch Completion/Unix/Command/_getopt...
Applied patch Completion/Unix/Command/_getopt cleanly.

index at:
100644 f6e65f99bac2ffc648577c2706d1adf5c52f7a91	Completion/Unix/Command/_getopt

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).