zsh-workers
 help / color / mirror / code / Atom feed
399baa1ed14f28ccaf48e6420128d16e377724db blob 1313 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
31
32
33
34
35
 
#compdef sh ash csh dash ksh ksh88 ksh93 mksh oksh pdksh rc tcsh yash

local bourne argv0
local -a args all_opts=( -{{0..9},{A..Z},{a..z}} )

[[ $service == (csh|?csh|fish|rc) ]] || bourne=1

# Bourne-style shells support +x variants
(( bourne )) && all_opts+=( ${all_opts/#-/+} )
# Bourne-style shells take argv[0] as the second argument to -c
(( bourne )) && argv0=':argv[0]:'

# All of the recognised shells support at least these arguments
args=(
  "(1 -)-c[execute specified command string]: :_cmdstring$argv0"
  '-e[exit immediately on non-zero return]'
  '-i[act as interactive shell]'
  '-l[act as login shell]'
  '-x[print command trace]'
  '1:script file:_files'
  '*:: :_files'
)
# Bourne-style shells support -o/+o option. Not all of them support -ooption in
# the same argument, but we'll allow it here for those that do
(( bourne )) && args+=(
  '-o+[set specified option]:option:'
  '+o+[unset specified option]:option:'
)
# Since this is a generic function we don't know what other options these shells
# support, but we don't want them to break the ones listed above, so we'll just
# ignore any other single-alphanumeric option. Obviously this doesn't account
# for long options
args+=( '!'${^${all_opts:#(${(~j<|>)${(@M)${(@M)args#(*[\*\)]|)[+-]?}%[+-]?}})}} )

_arguments -s -S -A '-*' : $args
debug log:

solving 399baa1ed ...
found 399baa1ed in https://inbox.vuxu.org/zsh-workers/DDBF2FA0-651A-46EC-B388-55950D64D4F6@dana.is/
found 39d299c58 in https://git.vuxu.org/mirror/zsh/
preparing index
index prepared:
100644 39d299c5864fe5a0e8941585bbe1b3ce3dc9845c	Completion/Unix/Command/_sh

applying [1/1] https://inbox.vuxu.org/zsh-workers/DDBF2FA0-651A-46EC-B388-55950D64D4F6@dana.is/
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
index 39d299c58..399baa1ed 100644

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

index at:
100644 399baa1ed14f28ccaf48e6420128d16e377724db	Completion/Unix/Command/_sh

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