mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
Merge remote-tracking branch 'origin/master' into 5.9
Right now, as we're preparing to tag the 5.8 release, the 5.9 branch is
maintained as a topic branch off master.
* origin/master:
45287: zshexpn: Describe parameter elision and add some introductory prose
45302: bin_umask(): Queue signals around umask().
users/24656: docs: Add an example of setting and querying zstyles
users/24659: Cross-ref doc for matchers.
45296: D02glob: Clean up after test from users/24633
45290: New helper script for listing XFail tests.
users/24633: Add an xfail test for users/24619.
unposted: additional typo fix
45280: _git: add -local variants
users/24628 (fixed): More doc for selectw-word-style widgets.
45266: Fix losetup completion, broken in da085b7a20
(41720).
unposted: Fix punctuation.
use /dev/fd on Cygwin for process substitution
unposted: Two additional typo fixes.
Fix typos reported by codespell in shell code
Fix typos reported by codespell in Src/
45269: Fix misspellings in completions and elsewhere.
45261: _gcc: Detect clang-as-gcc
unposted: internal: Remove Vim modeline that interferes with ztst.vim.
unposted: internal: ztst.vim: Use :syn-sync to work around (#x) and "`\\\\\\\\`" confusing the highlighting.
unposted: internal: zyodl.vim: Support glob qualifiers in example()'s
unposted: internal: zyodl.vim: Support yodl comments.
github #44: Allow completion for picocom to list symlinks to character devices
45245: _gcc: add some clang specific warnings
45231: _rsync: When completing remote modules, ignore more of the motd.
unposted: _tac: Eliminate superfluous variable
45226: _man: Improve completion of file paths
45184: Clarify documentation of %-sequences understood by compadd -[Xx]
45239: Remove 'appendhistory' from zsh-newuser-install
45218: add more options to swaks completion
45196: fix completion after make -C, allowing for -C being used multiple times
unposted (after 45183): Fix yodl error: "contrib.yo:4457: No macro: back(...)".
45181: Fix workers/45164: ${(S)%%} will now consider the empty string as a potential match.
45183: Improve documentation examples
unposted: Add some tests for ${(S)}, including a regression test for workers/45164.
45169/0002 (tweaked for trailing newlines): Add an expected-to-fail test for workers/44007.
45169/0001: In the test suite, allow test cases to be marked as expected to fail.
users/24582 + users/24583: Add regression tests for the previous commit.
24581: Fix array assignments in shell word splitting and completion.
45160: zshexpn: Expand documentation of (S)
45150 + 45152: zshexpn: Use a more minimal example in the documentation of (#b).
unposted: internal: Vim ztst support: Add an ftplugin in addition to the syntax highlighter.
45130: _multi_parts: Always pass -f to compadd if given by caller
unposted: zerrmsg(): Fix macro guard missed in previous commit
unposted: ChangeLog for last commit
internal: Allow %L in zerrmsg() in non-debug builds, too.
This commit is contained in:
commit
e899c21863
92 changed files with 806 additions and 227 deletions
|
@ -56,7 +56,7 @@ case $service in
|
|||
'-r[act recursively]' \
|
||||
'-s[act on symbolic links]' \
|
||||
'(-w)-v[always display file name]' \
|
||||
'(-c -d)-x[use hexademical format for value input and output]' \
|
||||
'(-c -d)-x[use hexadecimal format for value input and output]' \
|
||||
'*: :_files' \
|
||||
+ '(op)' \
|
||||
'(-l -x)-c[remove all attributes]' \
|
||||
|
|
|
@ -51,7 +51,7 @@ elif [[ $OSTYPE = solaris* ]]; then
|
|||
'*: :_files'
|
||||
)
|
||||
else
|
||||
# POSIX reqires '-u', and most OSes may support '-n'
|
||||
# POSIX requires '-u', and most OSes may support '-n'
|
||||
args=(
|
||||
'-n[number all output lines]'
|
||||
'-u[do not buffer output]'
|
||||
|
|
|
@ -36,7 +36,7 @@ _arguments -C \
|
|||
'*-eS\:-[audio stamp]:stamp-id (int)' \
|
||||
'*-ea\:-[amplify signal]:amplification value (percent)' \
|
||||
'*-eac\:-[amplify signal of channel]: :->eac' \
|
||||
'*-eaw\:-[amplify singal (clipping)]: :->eaw' \
|
||||
'*-eaw\:-[amplify signal (clipping)]: :->eaw' \
|
||||
'*-eal\:-[limits audio level]:limit (percent)' \
|
||||
'*-ec\:-[compressor (a simple one)]: :->ec' \
|
||||
'*-eca\:-[a more advanced compressor]: :->eca' \
|
||||
|
|
|
@ -13,6 +13,11 @@ if [[ "$service" = -value-* ]]; then
|
|||
args2=()
|
||||
fi
|
||||
else
|
||||
# On some systems (macOS), cc/gcc/g++ are actually clang; treat them accordingly
|
||||
[[ $service != clang* ]] &&
|
||||
_pick_variant clang=clang unix --version &&
|
||||
service=clang-$service
|
||||
|
||||
args2=( '*:input file:_files -g "*.([cCmisSoak]|cc|cpp|cxx|ii|k[ih])(-.)"' )
|
||||
fi
|
||||
|
||||
|
@ -350,10 +355,12 @@ if [[ "$service" = clang* ]]; then
|
|||
"-nostdinc[Do not search standard system directories or compiler builtin directories for include files]"
|
||||
"-nostdlibinc[Do not search standard system directories for include files]"
|
||||
"-nobuiltininc[Do not search builtin directory for include files]"
|
||||
"--help[Display this information]"
|
||||
)
|
||||
else
|
||||
args+=(
|
||||
'-flto=-[Enable link-time optimization]::jobs:'
|
||||
'*--help=-[Display this information]:class:->help'
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -427,7 +434,6 @@ args+=(
|
|||
'*-isystem:second include path directory (system):_files -/'
|
||||
'--sysroot=-[Use <directory> as the root directory for headers and libraries]:directory:_files -/'
|
||||
'-pass-exit-codes[Exit with highest error code from a phase]'
|
||||
'*--help=-[Display this information]:class:->help'
|
||||
'--target-help[Display target specific command line options]'
|
||||
'-dumpspecs[Display all of the built in spec strings]'
|
||||
'-dumpversion[Display the version of the compiler]'
|
||||
|
@ -676,7 +682,6 @@ args+=(
|
|||
'-Wunderflow[Warn about underflow of numerical constant expressions]'
|
||||
'-Wuninitialized[Warn about uninitialized automatic variables]'
|
||||
'-Wunknown-pragmas[Warn about unrecognized pragmas]'
|
||||
'-Wunreachable-code[Does nothing. Preserved for backward compatibility]'
|
||||
'-Wunsafe-loop-optimizations[Warn if the loop cannot be optimized due to nontrivial assumptions]'
|
||||
'-Wunsuffixed-float-constants[Warn about unsuffixed float constants]'
|
||||
'-Wunused-but-set-parameter[Warn when a function parameter is only set, otherwise unused]'
|
||||
|
@ -730,6 +735,20 @@ args+=(
|
|||
'-Werror=-[Treat specified warning as error (or all if none specified)]::warning:->werror'
|
||||
'-Wfatal-errors[Exit on the first error occurred]'
|
||||
)
|
||||
# clang specific warnings
|
||||
if [[ "$service" = clang* ]]; then
|
||||
args+=(
|
||||
'-Wunreachable-code[Warn on code that will not be executed]'
|
||||
'-Wunreachable-code-aggressive[Controls -Wunreachable-code, -Wunreachable-code-break, -Wunreachable-code-return]'
|
||||
'-Wunreachable-code-break[Warn when break will never be executed]'
|
||||
'-Wunreachable-code-loop-increment[Warn when loop will be executed only once]'
|
||||
'-Wunreachable-code-return[Warn when return will not be executed]'
|
||||
)
|
||||
else
|
||||
args+=(
|
||||
'-Wunreachable-code[Does nothing. Preserved for backward compatibility]'
|
||||
)
|
||||
fi
|
||||
# optimizers (from --help=optimizers), except for -O
|
||||
args+=(
|
||||
# --help=optimizers,^joined
|
||||
|
|
|
@ -1187,7 +1187,7 @@ _git-log () {
|
|||
fi
|
||||
|
||||
# TODO: Write a wrapper function that checks whether we have a
|
||||
# committish range or comittish and calls __git_tree_files
|
||||
# committish range or committish and calls __git_tree_files
|
||||
# appropriately.
|
||||
if __git_is_committish_range $line[1]; then
|
||||
__git_tree_files ${PREFIX:-.} $(__git_committish_range_last $line[1]) && ret=0
|
||||
|
@ -1671,7 +1671,7 @@ _git-shortlog () {
|
|||
;;
|
||||
(*)
|
||||
# TODO: Write a wrapper function that checks whether we have a
|
||||
# committish range or comittish and calls __git_tree_files
|
||||
# committish range or committish and calls __git_tree_files
|
||||
# appropriately.
|
||||
if __git_is_committish_range $line[1]; then
|
||||
__git_tree_files ${PREFIX:-.} $(__git_committish_range_last $line[1]) && ret=0
|
||||
|
@ -2101,7 +2101,7 @@ _git-switch() {
|
|||
case $state in
|
||||
branches)
|
||||
if [[ -n ${opt_args[(i)--guess]} ]]; then
|
||||
# --guess is the default but if it has been explictly specified,
|
||||
# --guess is the default but if it has been explicitly specified,
|
||||
# we'll only complete remote branches
|
||||
__git_remote_branch_names_noprefix && ret=0
|
||||
else
|
||||
|
@ -4352,7 +4352,7 @@ _git-send-email () {
|
|||
'--smtp-pass=[specify password to use for SMTP-AUTH]::password' \
|
||||
'--smtp-server=[specify SMTP server to connect to, or sendmail command]: : __git_sendmail_smtpserver_values' \
|
||||
'--smtp-server-port=[specify port to connect to SMTP server on]:smtp port:_ports' \
|
||||
'--smtp-server-option=[specify the outgoing SMTP server option to use]:SMPT server option' \
|
||||
'--smtp-server-option=[specify the outgoing SMTP server option to use]:SMTP server option' \
|
||||
'--smtp-ssl-cert-path=[path to ca-certificates (directory or file)]:ca certificates path:_files' \
|
||||
'--smtp-user=[specify user to use for SMTP-AUTH]:smtp user:_users' \
|
||||
'(--no-smtp-auth)--smtp-auth=[specify allowed AUTH mechanisms]:space-separated list of mechanisms' \
|
||||
|
@ -5421,7 +5421,7 @@ _git-verify-pack () {
|
|||
'*:index file:_files -g "*.idx(-.)"'
|
||||
}
|
||||
|
||||
# Synching Repositories
|
||||
# Syncing Repositories
|
||||
|
||||
(( $+functions[_git-daemon] )) ||
|
||||
_git-daemon () {
|
||||
|
@ -5432,7 +5432,7 @@ _git-daemon () {
|
|||
'--strict-paths[match paths exactly]' \
|
||||
'--access-hook=-[allow an external tool to accept or decline service]:path:_directories' \
|
||||
'--base-path=-[remap all the path requests as relative to the given path]:path:_directories' \
|
||||
'--base-path-relaxed[allow lookup of base path witout prefix]' \
|
||||
'--base-path-relaxed[allow lookup of base path without prefix]' \
|
||||
'--interpolated-path=-[dynamically construct alternate paths]:path:_directories' \
|
||||
'--export-all[allow pulling from all repositories without verification]' \
|
||||
'(--port --listen --user --group)--inetd[run server as an inetd service]' \
|
||||
|
@ -6100,7 +6100,7 @@ _git_column_layouts() {
|
|||
'(always never)auto[show in columns if the output is to the terminal]' \
|
||||
'(row plain)column[fill columns before rows]' \
|
||||
'(column plain)row[fill rows before columns]' \
|
||||
'(column row)plain[show in one colum]' \
|
||||
'(column row)plain[show in one column]' \
|
||||
'(nodense)dense[make unequal size columns to utilize more space]' \
|
||||
'(dense)nodense[make equal size columns]'
|
||||
}
|
||||
|
@ -6116,15 +6116,22 @@ __git_date_formats () {
|
|||
|
||||
date_formats=(
|
||||
relative:'show dates relative to the current time'
|
||||
local:'show timestamps in local timezone'
|
||||
local:'show timestamps in the local timezone'
|
||||
iso{,8601}:'show timestamps in ISO 8601 format'
|
||||
iso{,8601}-local:'show timestamps in ISO 8601 format in the local timezone'
|
||||
iso-strict:'show timestamps in strict ISO 8601 format'
|
||||
iso-strict-local:'show timestamps in strict ISO 8601 format in the local timezone'
|
||||
rfc{,2822}:'show timestamps in RFC 2822 format'
|
||||
rfc{,2822}-local:'show timestamps in RFC 2822 format in the local timezone'
|
||||
short:'show only date but not time'
|
||||
short-local:'show only date but not time in the local timezone'
|
||||
raw:'show date in internal raw git format (%s %z)'
|
||||
raw-local:'show date in internal raw git format (%s %z) in the local timezone'
|
||||
human:'elide some current and recent date elements'
|
||||
human-local:'elide some current and recent date elements in the local timezone'
|
||||
unix:'show date as a Unix epoch timestamp'
|
||||
default:'show timestamp in the original timezone'
|
||||
default:'show timestamp in rfc-like format'
|
||||
default-local:'show timestamp in rfc-like format in the local timezone'
|
||||
)
|
||||
|
||||
_describe -t date-formats 'date format' date_formats -- '( format\:custom\ format )' -S :
|
||||
|
|
|
@ -40,7 +40,7 @@ case "$words[2]" in
|
|||
'*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
|
||||
'*-dither[apply dithering]' \
|
||||
'*-edge:edge detection factor (0.0 - 99.9%%)' \
|
||||
'*-endian:image endianess:(MSB LSB)' \
|
||||
'*-endian:image endianness:(MSB LSB)' \
|
||||
'*+endian' \
|
||||
'*-enhance[enhance noisy image]' \
|
||||
'*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
|
||||
|
@ -162,7 +162,7 @@ case "$words[2]" in
|
|||
'-descend[descend window hierarchy]' \
|
||||
'-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
|
||||
'-dither[apply dithering]' \
|
||||
'(+endian)-endian:image endianess:(MSB LSB)' \
|
||||
'(+endian)-endian:image endianness:(MSB LSB)' \
|
||||
'(-endian)+endian' \
|
||||
'-frame[include window manager frame]' \
|
||||
'(- *)-help[display help information]' \
|
||||
|
@ -214,7 +214,7 @@ case "$words[2]" in
|
|||
'*-dither[apply dithering]' \
|
||||
'*+dither[render Postscript without aliasing]' \
|
||||
'*-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
|
||||
'*-endian:image endianess:(MSB LSB)' \
|
||||
'*-endian:image endianness:(MSB LSB)' \
|
||||
'*+endian' \
|
||||
'*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
|
||||
'*-frame[draw frame around image]' \
|
||||
|
@ -293,7 +293,7 @@ case "$words[2]" in
|
|||
'-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
|
||||
'-edge:edge detection factor (0.0 - 99.9%%)' \
|
||||
'-emboss[emboss image]' \
|
||||
'(+endian)-endian:image endianess:(MSB LSB)' \
|
||||
'(+endian)-endian:image endianness:(MSB LSB)' \
|
||||
'(-endian)+endian' \
|
||||
'-enhance[enhance image]' \
|
||||
'-equalize[histogram equalization]' \
|
||||
|
|
|
@ -208,7 +208,7 @@ else
|
|||
'-G[specify path and file-name of a generic boot-image]:boot image:_files' \
|
||||
'-hard-disk-boot[specify that the el torito boot-image is a hard-disk image]' \
|
||||
'-no-emul-boot[specify that the el torito boot-image is a "no emulation" image]' \
|
||||
'-no-boot[specify that the el torito CD should be markes an non-bootable]' \
|
||||
'-no-boot[specify that the el torito CD should be marked non-bootable]' \
|
||||
'-boot-load-seg[specify the load-segment address of the boot-image for a "no emulation" image]:segment address' \
|
||||
'-boot-lead-size[specify the number of 512-byte sectors to load in "no emulation" mode]:load sectors' \
|
||||
'-boot-info-table[specify that a 56-byte table of CD-ROM-layout information should be written]' \
|
||||
|
|
|
@ -38,7 +38,7 @@ if _pick_variant -r variant libiconv='GNU*libiconv' glibc='(Free Soft|GNU*libc|G
|
|||
_arguments -C -S -s : $args && return 0
|
||||
|
||||
if [[ $state = *_codeset ]]; then
|
||||
# suffix is meaningfull only for output encoding
|
||||
# suffix is meaningful only for output encoding
|
||||
if [[ $state = to_codeset ]] && compset -P '*[^/]/'; then
|
||||
_wanted suffix expl suffix compadd "$@" /TRANSLIT /IGNORE && ret=0
|
||||
else
|
||||
|
|
|
@ -44,7 +44,7 @@ case "$service" in
|
|||
'*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
|
||||
'*-dither[apply dithering]' \
|
||||
'*-edge:edge detection factor (0.0 - 99.9%%)' \
|
||||
'*-endian:image endianess:(MSB LSB)' \
|
||||
'*-endian:image endianness:(MSB LSB)' \
|
||||
'*+endian' \
|
||||
'*-enhance[enhance noisy image]' \
|
||||
'*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
|
||||
|
@ -166,7 +166,7 @@ case "$service" in
|
|||
'-descend[descend window hierarchy]' \
|
||||
'-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \
|
||||
'-dither[apply dithering]' \
|
||||
'(+endian)-endian:image endianess:(MSB LSB)' \
|
||||
'(+endian)-endian:image endianness:(MSB LSB)' \
|
||||
'(-endian)+endian' \
|
||||
'-frame[include window manager frame]' \
|
||||
'(- *)-help[display help information]' \
|
||||
|
@ -218,7 +218,7 @@ case "$service" in
|
|||
'*-dither[apply dithering]' \
|
||||
'*+dither[render Postscript without aliasing]' \
|
||||
'*-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
|
||||
'*-endian:image endianess:(MSB LSB)' \
|
||||
'*-endian:image endianness:(MSB LSB)' \
|
||||
'*+endian' \
|
||||
'*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \
|
||||
'*-frame[draw frame around image]' \
|
||||
|
@ -297,7 +297,7 @@ case "$service" in
|
|||
'-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \
|
||||
'-edge:edge detection factor (0.0 - 99.9%%)' \
|
||||
'-emboss[emboss image]' \
|
||||
'(+endian)-endian:image endianess:(MSB LSB)' \
|
||||
'(+endian)-endian:image endianness:(MSB LSB)' \
|
||||
'(-endian)+endian' \
|
||||
'-enhance[enhance image]' \
|
||||
'-equalize[histogram equalization]' \
|
||||
|
@ -511,7 +511,7 @@ case "$service" in
|
|||
'-file:output file:_files' \
|
||||
'-get[get files]' \
|
||||
'-port:port: _ports' \
|
||||
'-proxy:host of proxy ftp deamon:_hosts' \
|
||||
'-proxy:host of proxy ftp daemon:_hosts' \
|
||||
'-print[print files]' \
|
||||
'-prune[process files from remote directory]' \
|
||||
'-put[put files]' \
|
||||
|
|
|
@ -37,7 +37,7 @@ _arguments -C \
|
|||
'-memory-cache-size[cache memory]:size (bytes) [1048576]' \
|
||||
'-image-cache-size[image cache memory]:size (bytes) [1048576]' \
|
||||
'-font-cache-size[specify font cache size]:size (bytes) [2097152]' \
|
||||
"-aggressive-cache[cache everything regardless of server's caching recomendations]:enable [1]:((1\\:on 0\\:off))" \
|
||||
"-aggressive-cache[cache everything regardless of server's caching recommendations]:enable [1]:((1\\:on 0\\:off))" \
|
||||
'-address-preference[specify IP version preference]:preference:((
|
||||
0\:system\ default
|
||||
1\:prefer\ IPv4
|
||||
|
|
|
@ -135,7 +135,7 @@ ___luarocks_installed_rocks_cache_policy(){
|
|||
# ) if configuration files are newer:
|
||||
# * set and cache the values from the commands above
|
||||
# ) else:
|
||||
# * retrive from cache the values of the commands above
|
||||
# * retrieve from cache the values of the commands above
|
||||
# ) end if
|
||||
# ) end if
|
||||
|
||||
|
@ -190,7 +190,7 @@ ___luarocks_installed_rocks_cache_policy(){
|
|||
}
|
||||
(( $+functions[__luarocks_installed_rocks] )) ||
|
||||
__luarocks_installed_rocks(){
|
||||
# This function optionally recieves one argument of the tree in which
|
||||
# This function optionally receives one argument of the tree in which
|
||||
# installed rocks are searched for. If this argument is used, the installed
|
||||
# rocks which will be completed by this function will not use the cache which
|
||||
# is valid only for installed rocks on default trees like /usr/lib/luarocks
|
||||
|
@ -305,7 +305,7 @@ __luarocks_installed_rocks(){
|
|||
fi
|
||||
fi
|
||||
}
|
||||
# Used to complete one or more of the followings:
|
||||
# Used to complete one or more of the following:
|
||||
# - .rockspec file
|
||||
# - .src.rock file
|
||||
# - external rock
|
||||
|
|
|
@ -120,12 +120,12 @@ _make-parseMakefile () {
|
|||
|
||||
_make() {
|
||||
|
||||
local prev="$words[CURRENT-1]" file expl tmp is_gnu incl match basedir
|
||||
local prev="$words[CURRENT-1]" file expl tmp is_gnu incl match basedir nul=$'\0'
|
||||
local context state state_descr line
|
||||
local -a option_specs
|
||||
local -A VARIABLES VAR_ARGS opt_args
|
||||
local -aU TARGETS keys
|
||||
local ret=1
|
||||
local -i cdir=-1 ret=1
|
||||
|
||||
# VAR=VAL on the current command line
|
||||
for tmp in $words; do
|
||||
|
@ -142,7 +142,7 @@ _make() {
|
|||
incl="(-|)include"
|
||||
option_specs=(
|
||||
'(-B --always-make)'{-B,--always-make}'[unconditionally make all targets]'
|
||||
'*'{-C,--directory=}'[change directory first]:change to directory:->dir'
|
||||
'*'{-C,--directory=}'[change directory first]:change to directory:->cdir'
|
||||
'-d[print lots of debug information]'
|
||||
'--debug=-[print various types of debug information]:debug options:->debug'
|
||||
'(-e --environment-overrides)'{-e,--environment-overrides}'[environment variables override makefiles]'
|
||||
|
@ -177,7 +177,7 @@ _make() {
|
|||
# Basic make options only.
|
||||
incl=.include
|
||||
option_specs=(
|
||||
'-C[change directory first]:directory:->dir'
|
||||
'-C[change directory first]:directory:->cdir'
|
||||
'-I[include directory for makefiles]:directory:->dir'
|
||||
'-f[specify makefile]:makefile:->file'
|
||||
'-o[specify file not to remake]:file not to remake:->file'
|
||||
|
@ -188,11 +188,12 @@ _make() {
|
|||
_arguments -s $option_specs \
|
||||
'*:make target:->target' && ret=0
|
||||
|
||||
basedir=${(Q)~opt_args[-C]:-${opt_args[--directory]}}
|
||||
VAR_ARGS[CURDIR]="${basedir:=$PWD}"
|
||||
[[ $state = cdir ]] && cdir=-2
|
||||
basedir=${(j./.)${${~"${(@s.:.):-$PWD:${(Q)${opt_args[-C]:-$opt_args[--directory]}//\\:/$nul}}"}[(R)/*,cdir]}//$nul/:}
|
||||
VAR_ARGS[CURDIR]="${basedir}"
|
||||
|
||||
case $state in
|
||||
(dir)
|
||||
(*dir)
|
||||
_description directories expl "$state_descr"
|
||||
_files "$expl[@]" -W $basedir -/ && ret=0
|
||||
;;
|
||||
|
|
|
@ -381,7 +381,12 @@ _man() {
|
|||
|
||||
(( $#sects )) || return 1
|
||||
|
||||
_tags manuals.${^sects}
|
||||
if [[ $PREFIX$SUFFIX == */* ]]; then
|
||||
_tags manuals.${^sects} files
|
||||
else
|
||||
_tags manuals.${^sects}
|
||||
fi
|
||||
|
||||
while _tags; do
|
||||
for sect_dirname in $sects; do
|
||||
d=$sect_dirname
|
||||
|
@ -390,6 +395,8 @@ _man() {
|
|||
_requested manuals.$sect_dirname expl "manual page, section $d" _man_pages &&
|
||||
ret=0
|
||||
done
|
||||
[[ $PREFIX$SUFFIX == */* ]] &&
|
||||
_requested files expl directory _files -/ && ret=0
|
||||
(( ret )) || return 0
|
||||
done
|
||||
## To fall back to other sections' manpages when completing filenames, like
|
||||
|
|
|
@ -83,7 +83,7 @@ _moosic_add_cmds() {
|
|||
"noloop:turn loop mode off"
|
||||
"toggle-loop:toggle loop mode"
|
||||
"reconfigure:daemon reload configuration file"
|
||||
"showconfig:show dameon filetype associations"
|
||||
"showconfig:show daemon filetype associations"
|
||||
"start-server:starts new instance of daemon with given options"
|
||||
{quit,exit,die}":quit daemon"
|
||||
)
|
||||
|
|
|
@ -52,8 +52,8 @@ case $variant in
|
|||
'(-m --architecture)'{-m+,--architecture=}'[specify the target architecture]:architecture:->architectures'
|
||||
\*{-M+,--disassembler-options=}'[pass target specific information to the disassembler]:option:->disassembler_options'
|
||||
|
||||
"(-E --endian)-E+[assume endianess when disassembling]:endianess:((B\:\"assume big endian format when disassembling\" L\:\"assume little endian format when disassembling\"))"
|
||||
"(-E --endian)--endian=[assume endianess when disassembling]:endianess:((big\:\"assume big endian format when disassembling\" little\:\"assume little endian format when disassembling\"))"
|
||||
"(-E --endian)-E+[assume endianness when disassembling]:endianness:((B\:\"assume big endian format when disassembling\" L\:\"assume little endian format when disassembling\"))"
|
||||
"(-E --endian)--endian=[assume endianness when disassembling]:endianness:((big\:\"assume big endian format when disassembling\" little\:\"assume little endian format when disassembling\"))"
|
||||
|
||||
'--file-start-context[include context from start of file (with -S)]'
|
||||
\*{-I+,--include=}'[add directory to search list for source files]:directory:_files -/'
|
||||
|
|
|
@ -26,7 +26,7 @@ if _pick_variant gnu=GNU unix --version; then
|
|||
args=( ${(R)args:#(|\*)(|\(*\))-[hBIL]*} )
|
||||
args+=(
|
||||
'--traditional'
|
||||
'--endian=[swap input bytes]:endianess:(big little)'
|
||||
'--endian=[swap input bytes]:endianness:(big little)'
|
||||
{-S+,--strings=-}'[output strings of at least specified bytes long]:length'
|
||||
{-w-,--width=-}'[output specified bytes per line]:bytes'
|
||||
'(- : *)--help[display help and exit]'
|
||||
|
|
|
@ -335,9 +335,9 @@ _arguments -C \
|
|||
'--data-dir=[specify the user data directory to search for pandoc data files]:dir:_pandoc_data_dir' \
|
||||
'--base-header-level=[specify the base level for headers (defaults to 1)]:number:_pandoc_header_level' \
|
||||
'--strip-empty-paragraphs[deprecated. Use the +empty_paragraphs extension instead]: :' \
|
||||
'--indented-code-classes=[classes to use for indented code blocks]:class:{_message "Classes seperated with ,"}' \
|
||||
'--indented-code-classes=[classes to use for indented code blocks]:class:{_message "Classes separated with ,"}' \
|
||||
'*--filter=[specify an executable to be used as a filter transforming the pandoc AST after the input is parsed and before the output is written]:file:_pandoc_filter' \
|
||||
'*--lua-filter=[transform the document in a similar fashion as JSON filters (see --filter), but use pandoc'"'"'s build-in lua filtering system]:file:_pandoc_lua_filter' \
|
||||
'*--lua-filter=[transform the document in a similar fashion as JSON filters (see --filter), but use pandoc'"'"'s built-in lua filtering system]:file:_pandoc_lua_filter' \
|
||||
{-p,--preserve-tabs}'[preserve tabs instead of converting them to spaces]: :' \
|
||||
'--tab-stop=[specify the number of spaces per tab (default is 4)]:number:{_message -r "choose a number equals to or greater then 1"}' \
|
||||
'--track-changes=[specifies what to do with insertions, deletions, and comments produced by the MS Word "Track Changes" feature]: :_pandoc_track_changes' \
|
||||
|
|
|
@ -47,7 +47,7 @@ function _picocom () {
|
|||
'--omap[define output character map]:output character map:'
|
||||
'--emap[define local echo character map]:local echo character map:'
|
||||
'(--help -h)'{--help,-h}'[display help message]'
|
||||
'*:device:_files -g "*(%c)"' )
|
||||
'*:device:_files -g "*(-%c)"' )
|
||||
|
||||
_arguments -C : "${args[@]}"
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ case ${variant}:${${service#ping}:-4} in
|
|||
darwin*:6)
|
||||
args+=(
|
||||
'-B+[bind the socket to specified interface for sending]:interface:_net_interfaces'
|
||||
'-G+[specify max,min,increment size for ICMP payload for sweeping pings]:max,min,incr (defalt min=0 incr=1)'
|
||||
'-G+[specify max,min,increment size for ICMP payload for sweeping pings]:max,min,incr (default min=0 incr=1)'
|
||||
'-z+[specify traffic class]:traffic class'
|
||||
)
|
||||
;|
|
||||
|
|
|
@ -36,7 +36,7 @@ arguments=(
|
|||
"--print-requires[list all modules the package requires]"
|
||||
"--print-requires-private[list all modules the package requires for static linking (see --static)]"
|
||||
# "--msvc-syntax[output linker flags in a form compatible with MSVC++ (Windows only)]"
|
||||
# "--dont-define-prefix[disables automatic overiding of the variable \"prefix\" (Windows only)]"
|
||||
# "--dont-define-prefix[disables automatic overriding of the variable \"prefix\" (Windows only)]"
|
||||
# "--prefix-variable=[set the name of the variable \"prefix\" (Windows only)]:prefix value"
|
||||
"*: :->packages"
|
||||
)
|
||||
|
|
|
@ -610,7 +610,7 @@ _pgsql_initdb() {
|
|||
+ x # Exclusive options
|
||||
$common_opts_excl
|
||||
+ '(l)' # Locale options (general)
|
||||
{-l+,--locale=}'[specify locale (all catgories)]: :_locales'
|
||||
{-l+,--locale=}'[specify locale (all categories)]: :_locales'
|
||||
'--no-locale[equivalent to --locale=C]'
|
||||
+ lc # Locale options (specific) -- unlike createdb, NOT exclusive with -l
|
||||
'--lc-collate=[specify LC_COLLATE setting]: :_locales'
|
||||
|
|
|
@ -33,7 +33,7 @@ commands=(
|
|||
"lsjson\:'list directories and objects in the path in JSON format'"
|
||||
"lsl\:'list the objects in path with modification time, size and path'"
|
||||
"md5sum\:'produce an md5sum file for all the objects in the path'"
|
||||
"mkdir\:'make the path if it doesnt already exist'"
|
||||
"mkdir\:'make the path if it does not already exist'"
|
||||
"mount\:'mount the remote as file system on a mountpoint'"
|
||||
"move\:'move files from source to dest'"
|
||||
"moveto\:'move file or directory from source to dest'"
|
||||
|
|
|
@ -51,10 +51,11 @@ elif compset -P 1 '*::' || compset -P 1 'rsync://*/'; then
|
|||
fi
|
||||
|
||||
remfiles=(${${(f)"$(_call_program files rsync $pat 2>/dev/null)"}:#([ ]|MOTD:)*})
|
||||
remfiles=( ${(M)remfiles:#*$'\t'*} )
|
||||
|
||||
remmodules=(${remfiles/[ ]##/:})
|
||||
|
||||
_describe "remote modules" remmodules -S/
|
||||
_describe -V "remote modules" remmodules -S/
|
||||
|
||||
elif compset -P 'rsync://'; then
|
||||
_rsync_user_or_host / "$@"
|
||||
|
|
|
@ -59,7 +59,7 @@ case "$service" in
|
|||
'--boxes[report overfull and underfull boxes]' \
|
||||
'--check[report errors or warnings default action]' \
|
||||
'--deps[show the target file s dependencies]' \
|
||||
'--errors[show all errors that occured during compilation]' \
|
||||
'--errors[show all errors that occurred during compilation]' \
|
||||
'--refs[show the list of undefined references]' \
|
||||
'--warnings[show all LaTeX warnings]' \
|
||||
':LaTeX file:_files -g "*.(tex|dtx|lhs|w)(-.)"'
|
||||
|
|
|
@ -49,7 +49,7 @@ opts=(
|
|||
'--jit[enable jit with default options]'
|
||||
'--jit-warnings[enable printing JIT warnings]'
|
||||
'--jit-debug[enable JIT debugging (very slow)]'
|
||||
'--jit-wait[wait until JIT compilation is finished everytime (for testing)]'
|
||||
'--jit-wait[wait until JIT compilation is finished every time (for testing)]'
|
||||
'--jit-save-temps[save JIT temporary files]'
|
||||
'--jit-verbose=-[print JIT logs of level num or less to stderr]:maximum log level [0]'
|
||||
'--jit-max-cache=-[specify max number of methods to be JIT-ed in a cache]:number [1000]'
|
||||
|
|
|
@ -38,7 +38,7 @@ cmds_end=(
|
|||
'n:read the next line of input into pattern space'
|
||||
'N:append the next line of input to the pattern space'
|
||||
'p:print the current pattern space'
|
||||
'P:print upto the first newline of the current pattern space'
|
||||
'P:print up to the first newline of the current pattern space'
|
||||
'x:exchange hold and pattern spaces'
|
||||
'}:end group'
|
||||
)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#compdef swaks
|
||||
|
||||
local ign
|
||||
|
||||
(( $#words > 2 )) && ign='!'
|
||||
_arguments \
|
||||
'(-s --server -p --port)'{-s+,--server=}'[target host[:port\]]:host[\:port]:_hosts' \
|
||||
'(-p --port)'{-p+,--port=}'[target port number]:port number:(25 465 587)' \
|
||||
|
@ -27,14 +30,27 @@ _arguments \
|
|||
ESMTPS\:EHLO\ STARTTLS\ 25
|
||||
ESMTPSA\:EHLO\ STARTTLS\ 25\ authenticated
|
||||
))' \
|
||||
'-tls[TLS required]' \
|
||||
'(-tlsos --tls-optional-strict)'{-tlsos,--tls-optional-strict}'[TLS iff offered by target]' \
|
||||
'(-tls -tlsos --tls-optional-strict)-tls[TLS required]' \
|
||||
'(-tls -tlsos --tls-optional-strict)'{-tlsos,--tls-optional-strict}'[TLS iff offered by target]' \
|
||||
'(-tlsc --tls-on-connect)'{-tlsc,--tls-on-connect}'[TLS on connect (port 465)]' \
|
||||
'(-tlsp --tls-protocol)'{-tlsp,--tls-protocol=}':TLS protocol:(sslv2 sslv3 tlsv1 tlsv1_1 tlsv1_2)' \
|
||||
'-tls-cipher:OpenSSL cipher string: ' \
|
||||
'--tls-verify[verify TLS certificates]' \
|
||||
'--tls-ca-path=:OpenSSL CAfile or CAdir:_files' \
|
||||
'--tls-get-peer-cert=-:file to write (omit for STDOUT)' \
|
||||
'(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-a+,--auth=}'[use authentication, failing if no common auth-types found]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \
|
||||
'(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-ao,--auth-optional=}'[use authentication if common auth-types found]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \
|
||||
'(-a --auth -ao --auth-optional -aos --auth-optional-strict)'{-aos,--auth-optional-strict=}'[use authentication]::auth type:_sequence compadd - LOGIN PLAIN CRAM-MD5 DIGEST-MD5 CRAM-SHA1 NTLM SPA MSN' \
|
||||
'(-ap --auth-password)'{-ap,--auth-password=}'[provide the password to be used for authentication]::password' \
|
||||
\*{-ae,--auth-extra=}'[add extra information to authentication process]: :_values keywords
|
||||
{realm,domain,dmd5-{serv-type,host,serv-name}}\:value' \
|
||||
\*{-am,--auth-map=}'[map alternate names for authentication types]:alias=type,...' \
|
||||
'(-apt --auth-plaintext)'{-apt,--auth-plaintext}'[show auth strings in plaintext when printing on screen]' \
|
||||
'(-ahp --auth-hide-password)'{-ahp,--auth-hide-password}'[replace passwords with dummy string when printing to terminal]' \
|
||||
'(-d --data)'{-d+,--data=}'[specify DATA payload]:filename (or string with tokens):_files' \
|
||||
'*'{-ah,--add-header=}'[add headers]:<Header>\: Value' \
|
||||
'*'{-h,--header=}'[replace headers]:<Header>\: Value'
|
||||
'*'{-h,--header=}'[replace headers]:<Header>\: Value' \
|
||||
"${ign}(-)--support[display capabilities and exit]" \
|
||||
"--dump[display results of option processing but send no mail]" \
|
||||
"${ign}(-)--help[display usage information]" \
|
||||
"${ign}(-)--version[display version information]"
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
#compdef tac gtac
|
||||
|
||||
local variant
|
||||
|
||||
_pick_variant -r variant gnu='Free Soft' unix --version
|
||||
|
||||
# NetBSD (at least) has its own bare-bones version of this tool
|
||||
[[ $variant == gnu ]] || {
|
||||
_pick_variant gnu='Free Soft' unix --version || {
|
||||
_default
|
||||
return
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ local global_only_actions=(
|
|||
'(- :)'{-m,--portmap}'[enable portmapping via NAT-PMP or UPnP]'
|
||||
'(- :)'{-M,--no-portmap}'[disable portmapping]'
|
||||
'(- :)'{-o,--dht}'[enable distributed hash table]'
|
||||
'(- :)'{-O,--no-dht}'[disable distribued hash table]'
|
||||
'(- :)'{-O,--no-dht}'[disable distributed hash table]'
|
||||
'(- :)'{-u,--uplimit}'[limit the maximum upload speed to limit kB/s]:limit:{_message "limit in kB/sec"}'
|
||||
'(- :)'{-U,--no-uplimit}'[disable upload speed limits]'
|
||||
'(- :)--utp[enable uTP for peer connections]'
|
||||
|
@ -69,7 +69,7 @@ local torrent_add_options=(
|
|||
'(-c --incomplete-dir)'{-C,--no-incomplete-dir}'[don'"'"'t store incomplete torrents in a different directory]'
|
||||
{-w-,--download-dir=}'[when used in conjunction with --add, set the new torrent'"'"'s download folder]:dir:{_files -/}'
|
||||
)
|
||||
# `torrent_action_only_actions`: *actions* that can be speficied only when explicitly selecting a specific set of torrents
|
||||
# `torrent_action_only_actions`: *actions* that can be specified only when explicitly selecting a specific set of torrents
|
||||
local torrent_action_only_actions=(
|
||||
{-f,--files}'[get a file list for the current torrent(s)]'
|
||||
{-g,--get}'[mark file(s) for download]:torrent_file:_transmission-remote_torrent_get'
|
||||
|
@ -154,7 +154,7 @@ _transmission-remote_torrent(){
|
|||
local torrents_list_lines=(${(f)"$(transmission-remote "${authentication_args}" --list 2> /dev/null)"})
|
||||
local -a parts
|
||||
local -a torrents_ids torrents_names
|
||||
# While itereating through every line in the output above, we don't need the
|
||||
# While iterating through every line in the output above, we don't need the
|
||||
# first and last line which are just a header and summary
|
||||
for (( t = 2; t < ${#torrents_list_lines[@]} - 1; ++t )); do
|
||||
parts=(${(@s. .)torrents_list_lines[$t]})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue