mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +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
223
ChangeLog
223
ChangeLog
|
@ -28,6 +28,229 @@
|
|||
* 45131: Src/exec.c, Test/E02xtrace.ztst: Make a function that
|
||||
redefines itself preserve its tracedness.
|
||||
|
||||
2020-01-15 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45287: Doc/Zsh/expn.yo: zshexpn: Describe parameter elision
|
||||
and add some introductory prose
|
||||
|
||||
* 45302: Src/builtin.c: bin_umask(): Queue signals around
|
||||
umask().
|
||||
|
||||
2020-01-14 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* users/24656: Doc/Zsh/mod_zutil.yo: docs: Add an example of
|
||||
setting and querying zstyles
|
||||
|
||||
2020-01-14 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/24659: Doc/Zsh/compsys.yo: Cross-reference use of
|
||||
matcher and matcher-list with tag-order.
|
||||
|
||||
2020-01-13 dana <dana@dana.is>
|
||||
|
||||
* 45296: Test/D02glob.ztst: Clean up after test from users/24633
|
||||
|
||||
2020-01-13 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45290: Test/list-XFails: New helper script for listing
|
||||
XFail tests.
|
||||
|
||||
2020-01-12 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* users/24633: Test/D02glob.ztst: Add an xfail test for
|
||||
users/24619.
|
||||
|
||||
2020-01-11 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* unposted: Completion/Unix/Command/_cat: additional typo fix
|
||||
|
||||
* Eitan: 45280: Completion/Unix/Command/_git: add -local
|
||||
variants to completed date formats
|
||||
|
||||
2020-01-11 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/24628 (fixed up): Doc/Zsh/contrib.yo: Add example of how
|
||||
to bind word matching widget with a fixed style.
|
||||
|
||||
2020-01-10 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45266: Completion/Linux/Command/_losetup: Fix losetup
|
||||
completion, broken in da085b7a20729401c725f91ae930200d0deda64f
|
||||
(41720).
|
||||
|
||||
* unposted: Doc/Zsh/mod_zpty.yo: Fix punctuation.
|
||||
|
||||
2020-01-10 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 45264: configure.ac: use /dev/fd on Cygwin for process
|
||||
substitution
|
||||
|
||||
2020-01-09 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Completion/Debian/Command/_sbuild,
|
||||
Completion/Unix/Command/_growisofs: Two additional typo fixes.
|
||||
|
||||
2020-01-09 Jens Schleusener <Jens.Schleusener@fossies.org>
|
||||
|
||||
* 45269: Completion/BSD/Command/_mixerctl,
|
||||
Completion/Darwin/Command/_fs_usage,
|
||||
Completion/Darwin/Type/_mac_files_for_application,
|
||||
Completion/Debian/Command/_sbuild,
|
||||
Completion/Linux/Command/_brctl,
|
||||
Completion/Linux/Command/_findmnt,
|
||||
Completion/Linux/Command/_ltrace,
|
||||
Completion/Mandriva/Command/_urpmi,
|
||||
Completion/Redhat/Command/_yum,
|
||||
Completion/Unix/Command/_attr, Completion/Unix/Command/_git,
|
||||
Completion/Unix/Command/_graphicsmagick,
|
||||
Completion/Unix/Command/_iconv,
|
||||
Completion/Unix/Command/_imagemagick,
|
||||
Completion/Unix/Command/_links,
|
||||
Completion/Unix/Command/_luarocks,
|
||||
Completion/Unix/Command/_objdump, Completion/Unix/Command/_od,
|
||||
Completion/Unix/Command/_pandoc, Completion/Unix/Command/_ping,
|
||||
Completion/Unix/Command/_pkg-config,
|
||||
Completion/Unix/Command/_postgresql,
|
||||
Completion/Unix/Command/_rubber,
|
||||
Completion/Unix/Command/_transmission,
|
||||
Completion/Unix/Type/_baudrates,
|
||||
Completion/Unix/Type/_path_files, Etc/FAQ.yo,
|
||||
Functions/Zftp/zfautocheck, Misc/c2z, Src/Modules/curses.c,
|
||||
Src/Modules/db_gdbm.c, Src/Modules/parameter.c, Src/Zle/comp.h,
|
||||
Src/Zle/compcore.c, Src/Zle/compctl.c, Src/Zle/complete.c,
|
||||
Src/Zle/compresult.c, Src/Zle/computil.c, Src/Zle/zle_keymap.c,
|
||||
Src/Zle/zle_main.c, Src/Zle/zle_refresh.c, Src/pattern.c,
|
||||
Src/zsh.h, Src/ztype.h, Test/B01cd.ztst, Test/D04parameter.ztst:
|
||||
Fix misspellings in completions and elsewhere.
|
||||
|
||||
2020-01-08 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 45272, 45273: Fix more typos.
|
||||
|
||||
2020-01-08 dana <dana@dana.is>
|
||||
|
||||
* 45261: Completion/Unix/Command/_gcc: Detect clang-as-gcc
|
||||
|
||||
2020-01-07 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Test/X04zlehighlight.ztst: internal: Remove Vim
|
||||
modeline that interferes with ztst.vim.
|
||||
|
||||
* unposted: Util/ztst-syntax.vim: internal: ztst.vim: Use
|
||||
:syn-sync to work around (#x) and "`\\\\\\\\`" confusing the
|
||||
highlighting.
|
||||
|
||||
* unposted: Util/zyodl.vim: internal: zyodl.vim: Support glob
|
||||
qualifiers in example()'s
|
||||
|
||||
* unposted: Util/zyodl.vim: internal: zyodl.vim: Support yodl
|
||||
comments.
|
||||
|
||||
2020-01-07 Damien Thébault <damien.thebault@gmail.com>
|
||||
|
||||
* github #44: Completion/Unix/Command/_picocom: Allow completion
|
||||
for picocom to list symlinks to character devices
|
||||
|
||||
2020-01-06 dana <dana@dana.is>
|
||||
|
||||
* Eitan Adler: 45245: Completion/Unix/Command/_gcc: add some
|
||||
clang specific warnings
|
||||
|
||||
2020-01-06 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* 45231: Completion/Unix/Command/_rsync: When completing remote
|
||||
modules, ignore more of the motd.
|
||||
|
||||
2020-01-05 dana <dana@dana.is>
|
||||
|
||||
* unposted: Completion/Unix/Command/_tac: Eliminate superfluous
|
||||
variable
|
||||
|
||||
* 45226 (with Daniel, 45223): Completion/Unix/Command/_man:
|
||||
Improve completion of file paths
|
||||
|
||||
* 45184: Doc/Zsh/compsys.yo, Doc/Zsh/compwid.yo: Clarify
|
||||
documentation of %-sequences understood by compadd -[Xx]
|
||||
|
||||
2020-01-05 Andrey Butirsky <butirsky@gmail.com>
|
||||
|
||||
* 45239: Functions/Newuser/zsh-newuser-install: Remove
|
||||
'appendhistory' from zsh-newuser-install
|
||||
|
||||
2020-01-03 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* 45218: Completion/Unix/Command/_swaks: add more options
|
||||
|
||||
* 45196: Completion/Unix/Command/_make: fix completion after
|
||||
make -C, allowing for -C being used multiple times
|
||||
|
||||
2020-01-02 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted (after 45183): Doc/Zsh/contrib.yo: Fix yodl error:
|
||||
"contrib.yo:4457: No macro: back(...)".
|
||||
|
||||
* 45181: Src/glob.c, Test/D04parameter.ztst: Fix workers/45164:
|
||||
${(S)%%} will now consider the empty string as a potential match.
|
||||
|
||||
2020-01-01 dana <dana@dana.is>
|
||||
|
||||
* Stephane: 45183: Doc/Zsh/builtins.yo, Doc/Zsh/contrib.yo,
|
||||
Doc/Zsh/expn.yo: Improve documentation examples
|
||||
|
||||
2020-01-01 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Test/D04parameter.ztst: Add some tests for ${(S)},
|
||||
including a regression test for workers/45164.
|
||||
|
||||
* 45169/0002 (tweaked for trailing newlines): Etc/BUGS,
|
||||
Test/C03traps.ztst: Add an expected-to-fail test for
|
||||
workers/44007.
|
||||
|
||||
* 45169/0001: Test/B01cd.ztst, Test/ztst.zsh,
|
||||
Util/ztst-syntax.vim: In the test suite, allow test cases to
|
||||
be marked as expected to fail.
|
||||
|
||||
2019-12-31 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* users/24582 + users/24583: Test/D04parameter.ztst,
|
||||
Test/Y01completion.ztst: Add regression tests for the previous
|
||||
commit.
|
||||
|
||||
2019-12-30 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* users/24581: Src/Zle/zle_tricky.c, Src/hist.c: Array assignments
|
||||
after the first weren't parsed correctly by ${(z)...} or by
|
||||
completion.
|
||||
|
||||
2019-12-31 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* 45160: Doc/Zsh/expn.yo: zshexpn: Expand documentation
|
||||
of (S)
|
||||
|
||||
2019-12-28 Sebastian Gniazdowski <sgniazdowski@gmail.com>
|
||||
|
||||
* 45150 + 45152: Doc/Zsh/expn.yo: zshexpn: Use a more minimal
|
||||
example in the documentation of (#b).
|
||||
|
||||
2019-12-27 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Test/B01cd.ztst, Util/ztst-ftplugin.vim,
|
||||
Util/ztst-syntax.vim: internal: Vim ztst support: Add an ftplugin
|
||||
in addition to the syntax highlighter.
|
||||
|
||||
2019-12-26 dana <dana@dana.is>
|
||||
|
||||
* 45130: Completion/Base/Utility/_multi_parts: Always pass -f
|
||||
to compadd if given by caller
|
||||
|
||||
* unposted: Src/utils.c: Fix macro guard missed in previous
|
||||
commit
|
||||
|
||||
2019-12-26 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Src/utils.c: internal: Allow %L in zerrmsg() in
|
||||
non-debug builds, too.
|
||||
|
||||
2019-12-23 Daniel Shahaf <danielsh@apache.org>
|
||||
|
||||
* unposted: Completion/Unix/Command/_stdbuf: Fix mismatch
|
||||
|
|
|
@ -8,4 +8,4 @@ _arguments -s -S -A "-*" \
|
|||
'(-a -n -v)-q[Suppress all printing when setting a variable]' \
|
||||
'(-a -n -v)-t[Attempt to select the next possible value of an enum]' \
|
||||
'(-q -t)-v[Show all possible values of variables]' \
|
||||
'(-a)*:mixerctl varible:_multi_parts -i -S = -q . _cache_mixerctlvars'
|
||||
'(-a)*:mixerctl variable:_multi_parts -i -S = -q . _cache_mixerctlvars'
|
||||
|
|
|
@ -15,7 +15,7 @@ typeset -U tmp1 matches
|
|||
|
||||
zparseopts -D -a sopts \
|
||||
'J+:=group' 'V+:=group' 'x+:=expl' 'X+:=expl' 'P:=opts' 'F:=opts' \
|
||||
S: r: R: q 1 2 o+: n f 'M+:=matcher' 'i=imm'
|
||||
S: r: R: q 1 2 o+: n 'f=opts' 'M+:=matcher' 'i=imm'
|
||||
|
||||
sopts=( "$sopts[@]" "$opts[@]" )
|
||||
if (( $#matcher )); then
|
||||
|
|
|
@ -6,7 +6,7 @@ typeset -A opt_args
|
|||
_arguments -s -C -A '-*' : \
|
||||
'-e[exclude fs_usage and the specified processes from sampling]' \
|
||||
'-w[use wider output]' \
|
||||
'*-f+[specify output filtering mode]:mode:(nework filesys pathname exec diskio cachehit)' \
|
||||
'*-f+[specify output filtering mode]:mode:(network filesys pathname exec diskio cachehit)' \
|
||||
'-b[annotate disk I/O events with BootCache info]' \
|
||||
'(-R -S -E)-t+[specify run timeout]:seconds' \
|
||||
'(-t)-R+[specify raw trace file to process]:raw trace file:_files' \
|
||||
|
|
|
@ -44,7 +44,7 @@ _mac_files_for_application() {
|
|||
local -a glob_patterns
|
||||
glob_patterns=()
|
||||
|
||||
# Try to get extentions from "Info.plist" XML file.
|
||||
# Try to get extensions from "Info.plist" XML file.
|
||||
if [[ -f "$app_path/Contents/Info.plist" ]]; then
|
||||
local -a exts types
|
||||
_mac_parse_info_plist
|
||||
|
|
|
@ -115,7 +115,7 @@ _sbuild() {
|
|||
'--finished-build-commands=[run commands after package is built]:commands' \
|
||||
'--build-failed-commands=[run commands after dpkg-buildpackage fails]:commands' \
|
||||
'--chroot-cleanup-commands=[run commands after chroot cleanup]:commands' \
|
||||
'--post-build-commands=[run commands after package is build sucessfuly]:commands' \
|
||||
'--post-build-commands=[run commands after package is built successfully]:commands' \
|
||||
'--post-build-failed-commands[run commands after package failed to build]:commands' \
|
||||
'--anything-failed-commands=[run commands for all --xxx-failed-commands option]:commands' \
|
||||
'--log-external-command-output[external commands output are logged]' \
|
||||
|
|
|
@ -13,7 +13,7 @@ if (( CURRENT == 2 )); then
|
|||
hairpin:toggle\ hairpin\ mode\ on\ a\ port
|
||||
showmacs:show\ a\ list\ of\ learned\ MAC\ addresses
|
||||
setageing:set\ MAC\ address\ ageing\ time
|
||||
setgcint:set\ grabage\ collection\ interval
|
||||
setgcint:set\ garbage\ collection\ interval
|
||||
stp:control\ use\ of\ spanning\ tree\ protocol
|
||||
showstp:show\ bridge\ stp\ info
|
||||
setbridgeprio:set\ bridge\ priority
|
||||
|
|
|
@ -32,7 +32,7 @@ _arguments -s -C \
|
|||
'(H -U --uniq)'{-U,--uniq}'[ignore filesystems with duplicated mount targets]' \
|
||||
'(H -u --notruncate)'{-u,--notruncate}'[do not truncate text in columns]' \
|
||||
'(H -v --nofsroot)'{-v,--nofsroot}'[do not print \[/dir\] in the SOURCE column]' \
|
||||
'(H -w --timeout)'{-w+,--timeout}'[specify timeout for --poll]:miliseconds: ' \
|
||||
'(H -w --timeout)'{-w+,--timeout}'[specify timeout for --poll]:milliseconds: ' \
|
||||
'(H -x --verify)'{-x,--verify}'[check mount table content]' \
|
||||
'(H)--verbose[print more information]' \
|
||||
'(H)1: :->sources_targets' \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#lcompdef losetup -value-,LOOPDEV_DEBUG,-default-
|
||||
#compdef losetup -value-,LOOPDEV_DEBUG,-default-
|
||||
|
||||
if [[ $service = *LOOPDEV_DEBUG* ]]; then
|
||||
local expl
|
||||
|
|
|
@ -5,7 +5,7 @@ local root hlp="-h --help -V --version"
|
|||
(( EUID )) && root='!'
|
||||
|
||||
_arguments -s -S $args \
|
||||
"(-c -a --align $hlp)"{-a+,--align=}"[align return values in a secific column]:column [$((COLUMNS*5/8))]" \
|
||||
"(-c -a --align $hlp)"{-a+,--align=}"[align return values in a specific column]:column [$((COLUMNS*5/8))]" \
|
||||
"(-c $hlp)-A+[specify maximum number of array elements to print]:elements" \
|
||||
"(-c -b --no-signals $hlp)"{-b,--no-signals}"[don't print signals]" \
|
||||
"(-a --align -A -b --no-signals -i -n --indent -r -s -t -tt -ttt -T $hlp)-c[count time and calls, and report a summary on exit]" \
|
||||
|
|
|
@ -87,7 +87,7 @@ _urpmi() {
|
|||
"($help)--auto[automatically select a package in choices]"
|
||||
"($help)--force[force invocation even if some packages do not exist]"
|
||||
"($help)--parallel[distributed urpmi across machines of alias]:urpmi alias name:_urpmi_parallel_alias"
|
||||
"($help)--root[use another root for rpm installation]:root diretory:_files -/"
|
||||
"($help)--root[use another root for rpm installation]:root directory:_files -/"
|
||||
"($help)--test[test only, do not modify system]"
|
||||
"($help)-a[select all matches on command line]"
|
||||
)
|
||||
|
@ -147,7 +147,7 @@ _urpmi() {
|
|||
"($help : -)"{--help,-h}"[print usage information]" \
|
||||
"($help :)-a[select all media]" \
|
||||
"($help)-c[clean headers cache directory]" \
|
||||
"($help)-y[fuzzy mathing on media names]" \
|
||||
"($help)-y[fuzzy matching on media names]" \
|
||||
"(-a)"{,\*}":media:_sequence _urpmi_media" \
|
||||
&& ret=0
|
||||
;;
|
||||
|
@ -189,7 +189,7 @@ _urpmi() {
|
|||
"($help)--more-choices[propose more choices than the default]" \
|
||||
"($help --no-resume)--resume[resume transfer of partially-downloaded files]" \
|
||||
"($help --resume)--no-resume[do not resume transfer of partially-downloaded files]" \
|
||||
"($help)--root[use another root for rpm installation]:root diretory:_files -/" \
|
||||
"($help)--root[use another root for rpm installation]:root directory:_files -/" \
|
||||
"($help)--skip[packages which installation should be skipped]:packages: " \
|
||||
"($help)--split-length[small transaction length]:transaction length: " \
|
||||
"($help)--split-level[split in small transaction]:transaction size: " \
|
||||
|
|
|
@ -39,7 +39,7 @@ _yum() {
|
|||
'--color=[control whether color is used]:(always auto never)' \
|
||||
'--releasever=[set value of $releasever in yum config and repo files]:value' \
|
||||
"--downloadonly[don't update, just download]" \
|
||||
'--downloaddir=[specify alternate directory to store packages]:directort:_directories' \
|
||||
'--downloaddir=[specify alternate directory to store packages]:directory:_directories' \
|
||||
'--setopt=[set arbitrary config and repo options]:option' \
|
||||
'--bugfix[include bugfix relevant packages in updates]' \
|
||||
'--security[include security relevant packages in updates]' \
|
||||
|
|
|
@ -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]})
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# -l LIMIT Lower limit. Like -u but for the lower boundary.
|
||||
#
|
||||
# -f FUNCTION If given FUNCION is used as a predicate to filter the
|
||||
# -f FUNCTION If given FUNCTION is used as a predicate to filter the
|
||||
# value in the complete list to generate an arbitrary
|
||||
# sub-set.
|
||||
#
|
||||
|
|
|
@ -96,7 +96,7 @@ _canonical_paths() {
|
|||
|
||||
# This style controls how many parent directory links (..) to chase searching
|
||||
# for possible completions. The default is 8. Note that this chasing is
|
||||
# triggered only when the user enters atleast a .. and the path completed
|
||||
# triggered only when the user enters at least a .. and the path completed
|
||||
# contains only . or .. components. A value of 0 turns off .. link chasing
|
||||
# altogether.
|
||||
|
||||
|
|
|
@ -425,7 +425,7 @@ for prepath in "$prepaths[@]"; do
|
|||
|
||||
tmp1=( "$prepath$realpath$donepath$tmp2" )
|
||||
|
||||
# count of attemps for pws non-canonical hack
|
||||
# count of attempts for pws non-canonical hack
|
||||
(( npathcheck = 0 ))
|
||||
while true; do
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ _osc_cmd_do() {
|
|||
local -a cmdlist
|
||||
local tag=0
|
||||
|
||||
# only start completion if theres some '-' on the line
|
||||
# only start completion if there's some '-' on the line
|
||||
if ! [ "$words[2]" = "-" ]; then
|
||||
_complete
|
||||
return
|
||||
|
|
|
@ -39,11 +39,11 @@ be familiar to most command line users.
|
|||
|
||||
Typically, options are single letters preceded by a hyphen (tt(-)).
|
||||
Options that take an argument accept it either immediately following the
|
||||
option letter or after white space, for example `tt(print -C3 *)' or
|
||||
`tt(print -C 3 *)' are equivalent. Arguments to options are not the
|
||||
option letter or after white space, for example `tt(print -C3 {1..9})' or
|
||||
`tt(print -C 3 {1..9})' are equivalent. Arguments to options are not the
|
||||
same as arguments to the command; the documentation indicates which is
|
||||
which. Options that do not take an argument may be combined in a single
|
||||
word, for example `tt(print -ca *)' and `tt(print -c -a *)' are
|
||||
word, for example `tt(print -rca -- *)' and `tt(print -r -c -a -- *)' are
|
||||
equivalent.
|
||||
|
||||
Some shell builtin commands also take options that begin with `tt(+)'
|
||||
|
@ -54,14 +54,14 @@ Options (together with their individual arguments, if any) must appear
|
|||
in a group before any non-option arguments; once the first non-option
|
||||
argument has been found, option processing is terminated.
|
||||
|
||||
All builtin commands other than precommand modifiers, even those that
|
||||
have no options, can be given the argument `tt(-)tt(-)' to terminate option
|
||||
processing. This indicates that the following words are non-option
|
||||
arguments, but is otherwise ignored. This is useful in cases where
|
||||
arguments to the command may begin with `tt(-)'. For historical
|
||||
reasons, most builtin commands also recognize a single `tt(-)' in a
|
||||
separate word for this purpose; note that this is less standard and
|
||||
use of `tt(-)tt(-)' is recommended.
|
||||
All builtin commands other than `tt(echo)' and precommand modifiers,
|
||||
even those that have no options, can be given the argument `tt(-)tt(-)'
|
||||
to terminate option processing. This indicates that the following words
|
||||
are non-option arguments, but is otherwise ignored. This is useful in
|
||||
cases where arguments to the command may begin with `tt(-)'. For
|
||||
historical reasons, most builtin commands (including `tt(echo)') also
|
||||
recognize a single `tt(-)' in a separate word for this purpose; note
|
||||
that this is less standard and use of `tt(-)tt(-)' is recommended.
|
||||
|
||||
startitem()
|
||||
prefix(-)
|
||||
|
@ -114,9 +114,9 @@ var(text) is any non-empty string, it is replaced by the text
|
|||
a literal string, not a pattern. A trailing space in var(value) is not
|
||||
special in this case. For example,
|
||||
|
||||
example(alias -s ps=gv)
|
||||
example(alias -s ps='gv --')
|
||||
|
||||
will cause the command `tt(*.ps)' to be expanded to `tt(gv *.ps)'. As
|
||||
will cause the command `tt(*.ps)' to be expanded to `tt(gv -- *.ps)'. As
|
||||
alias expansion is carried out earlier than globbing, the `tt(*.ps)' will
|
||||
then be expanded. Suffix aliases constitute a different name space from
|
||||
other aliases (so in the above example it is still possible
|
||||
|
@ -1258,7 +1258,10 @@ If given together with tt(-o) or tt(-O), sorting is performed
|
|||
case-independently.
|
||||
)
|
||||
item(tt(-l))(
|
||||
Print the arguments separated by newlines instead of spaces.
|
||||
Print the arguments separated by newlines instead of spaces. Note: if
|
||||
the list of arguments is empty, tt(print -l) will still output one empty
|
||||
line. To print a possibly-empty list of arguments one per line, use
|
||||
tt(print -C1), as in `tt(print -rC1 -- "$list[@]")'.
|
||||
)
|
||||
item(tt(-m))(
|
||||
Take the first argument as a pattern (should be quoted), and remove
|
||||
|
@ -1269,7 +1272,9 @@ item(tt(-n))(
|
|||
Do not add a newline to the output.
|
||||
)
|
||||
item(tt(-N))(
|
||||
Print the arguments separated and terminated by nulls.
|
||||
Print the arguments separated and terminated by nulls. Again,
|
||||
tt(print -rNC1 -- "$list[@]") is a canonical way to print an
|
||||
arbitrary list as null-delimited records.
|
||||
)
|
||||
item(tt(-o))(
|
||||
Print the arguments sorted in ascending order.
|
||||
|
|
|
@ -1609,16 +1609,12 @@ item(tt(format))(
|
|||
If this is set for the tt(descriptions) tag, its value is used as a
|
||||
string to display above matches in completion lists. The sequence
|
||||
`tt(%d)' in this string will be replaced with a short description of
|
||||
what these matches are. This string may also contain the following
|
||||
sequences to specify output attributes
|
||||
ifnzman((see noderef(Prompt Expansion)))\
|
||||
ifzman(as described in the section EXPANSION OF PROMPT SEQUENCES in
|
||||
zmanref(zshmisc)):
|
||||
`tt(%B)', `tt(%S)', `tt(%U)', `tt(%F)', `tt(%K)' and their lower case
|
||||
counterparts, as well as `tt(%{)...tt(%})'. `tt(%F)', `tt(%K)' and
|
||||
`tt(%{)...tt(%})' take arguments in the same form as prompt
|
||||
expansion. Note that the sequence `tt(%G)' is not available; an argument
|
||||
to `tt(%{)' should be used instead.
|
||||
what these matches are. This string may also contain the output
|
||||
attribute sequences understood by tt(compadd -X)
|
||||
(see
|
||||
ifzman(zmanref(zshcompwid))\
|
||||
ifnzman(noderef(Completion Widgets))\
|
||||
).
|
||||
|
||||
The style is tested with each tag valid for the current completion
|
||||
before it is tested for the tt(descriptions) tag. Hence different format
|
||||
|
@ -2064,6 +2060,9 @@ specification. The value should be in the form described in
|
|||
ifzman(the section `Completion Matching Control' in zmanref(zshcompwid))\
|
||||
ifnzman(noderef(Completion Matching Control))\
|
||||
. For examples of this, see the description of the tt(tag-order) style.
|
||||
|
||||
For notes comparing the use of this and the tt(matcher-list) style, see
|
||||
under the description of the tt(tag-order) style.
|
||||
)
|
||||
kindex(matcher-list, completion style)
|
||||
item(tt(matcher-list))(
|
||||
|
@ -2128,6 +2127,9 @@ If there is no current matcher or it is empty, and the option
|
|||
tt(NO_CASE_GLOB) is in effect, the matching for files is performed
|
||||
case-insensitively in any case. However, any matcher must
|
||||
explicitly specify case-insensitive matching if that is required.
|
||||
|
||||
For notes comparing the use of this and the tt(matcher) style, see
|
||||
under the description of the tt(tag-order) style.
|
||||
)
|
||||
kindex(max-errors, completion style)
|
||||
item(tt(max-errors))(
|
||||
|
@ -4588,7 +4590,9 @@ not set with the former.
|
|||
If the tt(-r) option is given, no style is used; the var(descr) is
|
||||
taken literally as the string to display. This is most useful
|
||||
when the var(descr) comes from a pre-processed argument list
|
||||
which already contains an expanded description.
|
||||
which already contains an expanded description. Note that this
|
||||
option does not disable the `tt(%)'-sequence parsing done by
|
||||
tt(compadd).
|
||||
|
||||
The tt(-12VJ) options and the var(group) are passed to tt(compadd) and
|
||||
hence determine the group the message string is added to.
|
||||
|
|
|
@ -590,6 +590,30 @@ different name spaces.
|
|||
item(tt(-X) var(explanation))(
|
||||
The var(explanation) string will be printed with the list of matches,
|
||||
above the group currently selected.
|
||||
|
||||
Within the var(explanation), the following sequences may be used to
|
||||
specify output attributes
|
||||
ifnzman((see noderef(Prompt Expansion)))\
|
||||
ifzman(as described in the section EXPANSION OF PROMPT SEQUENCES in
|
||||
zmanref(zshmisc)):
|
||||
`tt(%B)', `tt(%S)', `tt(%U)', `tt(%F)', `tt(%K)' and their lower case
|
||||
counterparts, as well as `tt(%{)...tt(%})'. `tt(%F)', `tt(%K)' and
|
||||
`tt(%{)...tt(%})' take arguments in the same form as prompt
|
||||
expansion. (Note that the sequence `tt(%G)' is not available; an
|
||||
argument to `tt(%{)' should be used instead.) The sequence `tt(%%)'
|
||||
produces a literal `tt(%)'.
|
||||
|
||||
These sequences are most often employed by users when customising the
|
||||
tt(format) style
|
||||
(see
|
||||
ifzman(zmanref(zshcompsys))\
|
||||
ifnzman(noderef(Completion System))\
|
||||
),
|
||||
but they must also be taken into account when writing completion
|
||||
functions, as passing descriptions with unescaped `tt(%)' characters
|
||||
to utility functions such as tt(_arguments) and tt(_message) may
|
||||
produce unexpected results. If arbitrary text is to be passed in a
|
||||
description, it can be escaped using e.g. tt(${my_str//\%/%%}).
|
||||
)
|
||||
item(tt(-x) var(message))(
|
||||
Like tt(-X), but the var(message) will be printed even if there are no
|
||||
|
|
|
@ -2227,7 +2227,20 @@ is set in the context tt(:zle:*) to tt(true) if the word style is
|
|||
tt(bash) and tt(false) otherwise. It may be overridden by setting it in
|
||||
the more specific context tt(:zle:forward-word*).
|
||||
|
||||
Here are some examples of use of the styles, actually taken from the
|
||||
It is possible to create widgets with specific behaviour by defining
|
||||
a new widget implemented by the appropriate generic function, then
|
||||
setting a style for the context of the specific widget. For example,
|
||||
the following defines a widget tt(backward-kill-space-word) using
|
||||
tt(backward-kill-word-match), the generic widget implementing
|
||||
tt(backward-kill-word) behaviour, and ensures that the new widget
|
||||
always implements space-delimited behaviour.
|
||||
|
||||
example(zle -N backward-kill-space-word backward-kill-word-match
|
||||
zstyle :zle:backward-kill-space-word word-style space)
|
||||
|
||||
The widget tt(backward-kill-space-word) can now be bound to a key.
|
||||
|
||||
Here are some further examples of use of the styles, actually taken from the
|
||||
simplified interface in tt(select-word-style):
|
||||
|
||||
example(zstyle ':zle:*' word-style standard
|
||||
|
@ -4418,24 +4431,28 @@ the elements from the tt(input) list in each run. If no var(command) is
|
|||
provided, then no var(arg) list may be provided, and in that event the
|
||||
default command is `tt(print)' with arguments `tt(-r -)tt(-)'.
|
||||
|
||||
For example, to get a long tt(ls) listing of all plain files in the
|
||||
current directory or its subdirectories:
|
||||
For example, to get a long tt(ls) listing of all non-hidden plain files
|
||||
in the current directory or its subdirectories:
|
||||
|
||||
example(autoload -U zargs
|
||||
zargs -- **/*(.) -- ls -l)
|
||||
zargs -- **/*(.) -- ls -ld --)
|
||||
|
||||
Note that `tt(-)tt(-)' is used both to mark the end of the var(option)
|
||||
list and to mark the end of the var(input) list, so it must appear twice
|
||||
whenever the var(input) list may be empty. If there is guaranteed to be
|
||||
at least one var(input) and the first var(input) does not begin with a
|
||||
`tt(-)', then the first `tt(-)tt(-)' may be omitted.
|
||||
The first and third occurrences of `tt(-)tt(-)' are used to mark the end
|
||||
of options for tt(zargs) and tt(ls) respectively to guard against
|
||||
filenames starting with `tt(-)', while the second is used to separate the
|
||||
list of files from the command to run (`tt(ls -ld --)').
|
||||
|
||||
The first `tt(-)tt(-)' would also be needed if there was a chance the
|
||||
list might be empty as in:
|
||||
|
||||
example(zargs -r -- ./*.back+LPAR()#qN+RPAR() -- rm -f)
|
||||
|
||||
In the event that the string `tt(-)tt(-)' is or may be an var(input), the
|
||||
tt(-e) option may be used to change the end-of-inputs marker. Note that
|
||||
this does em(not) change the end-of-options marker. For example, to use
|
||||
`tt(..)' as the marker:
|
||||
|
||||
example(zargs -e.. -- **/*(.) .. ls -l)
|
||||
example(zargs -e.. -- **/*(.) .. ls -ld --)
|
||||
|
||||
This is a good choice in that example because no plain file can be named
|
||||
`tt(..)', but the best end-marker depends on the circumstances.
|
||||
|
|
|
@ -400,7 +400,7 @@ backslashes.
|
|||
For example, the following piece of filename generation code
|
||||
with the tt(EXTENDED_GLOB) option:
|
||||
|
||||
example(print *.c+LPAR()#q:s/#%+LPAR()#b+RPAR()s+LPAR()*+RPAR().c/'S${match[1]}.C'/+RPAR())
|
||||
example(print -r -- *.c+LPAR()#q:s/#%+LPAR()#b+RPAR()s+LPAR()*+RPAR().c/'S${match[1]}.C'/+RPAR())
|
||||
|
||||
takes the expansion of tt(*.c) and applies the glob qualifiers in the
|
||||
tt(LPAR()#q)var(...)tt(RPAR()) expression, which consists of a substitution
|
||||
|
@ -582,7 +582,25 @@ and subscript notation to access individual array elements.
|
|||
Note in particular the fact that words of unquoted parameters are not
|
||||
automatically split on whitespace unless the option tt(SH_WORD_SPLIT) is
|
||||
set; see references to this option below for more details. This is an
|
||||
important difference from other shells.
|
||||
important difference from other shells. However, as in other shells,
|
||||
null words are elided from unquoted parameters' expansions.
|
||||
|
||||
With default options, after the assignments:
|
||||
|
||||
example(array=("first word" "" "third word")
|
||||
scalar="only word")
|
||||
|
||||
then tt($array) substitutes two words, `tt(first word)' and `tt(third
|
||||
word)', and tt($scalar) substitutes a single word `tt(only word)'. Note
|
||||
that second element of tt(array) was elided. Scalar parameters can
|
||||
be elided too if their value is null (empty). To avoid elision, use quoting as
|
||||
follows: tt("$scalar") for scalars and tt("${array[@]}") or tt("${(@)array}")
|
||||
for arrays. (The last two forms are equivalent.)
|
||||
|
||||
Parameter expansions can involve em(flags), as in `tt(${(@kv)aliases})',
|
||||
and other operators, such as `tt(${PREFIX:-"/usr/local"})'. Parameter
|
||||
expansions can also be nested. These topics will be introduced below.
|
||||
The full rules are complicated and are noted at the end.
|
||||
|
||||
In the expansions discussed below that require a pattern, the form of
|
||||
the pattern is the same as that used for filename generation;
|
||||
|
@ -594,17 +612,8 @@ noderef(Modifiers) in noderef(History Expansion) can be
|
|||
applied: for example, tt(${i:s/foo/bar/}) performs string
|
||||
substitution on the expansion of parameter tt($i).
|
||||
|
||||
In the following descriptions, `word' refers to a single word
|
||||
In the following descriptions, `var(word)' refers to a single word
|
||||
substituted on the command line, not necessarily a space delimited word.
|
||||
With default options, after the assignments:
|
||||
|
||||
example(array=("first word" "second word")
|
||||
scalar="only word")
|
||||
|
||||
then tt($array) substitutes two words, `tt(first word)' and `tt(second
|
||||
word)', and tt($scalar) substitutes a single word `tt(only word)'. This
|
||||
may be modified by explicit or implicit word-splitting, however. The
|
||||
full rules are complicated and are noted at the end.
|
||||
|
||||
startitem()
|
||||
item(tt(${)var(name)tt(}))(
|
||||
|
@ -1394,11 +1403,40 @@ used with the tt(${)...tt(/)...tt(}) forms.
|
|||
|
||||
startitem()
|
||||
item(tt(S))(
|
||||
Search substrings as well as beginnings or ends; with tt(#) start
|
||||
from the beginning and with tt(%) start from the end of the string.
|
||||
With tt(#) or tt(##), search for the match that starts closest to the start of
|
||||
the string (a `substring match'). Of all matches at a particular position,
|
||||
tt(#) selects the shortest and tt(##) the longest:
|
||||
|
||||
example(% str="aXbXc"
|
||||
% echo ${+LPAR()S+RPAR()str#X*}
|
||||
abXc
|
||||
% echo ${+LPAR()S+RPAR()str##X*}
|
||||
a
|
||||
% )
|
||||
|
||||
With tt(%) or tt(%%), search for the match that starts closest to the end of
|
||||
the string:
|
||||
|
||||
example(% str="aXbXc"
|
||||
% echo ${+LPAR()S+RPAR()str%X*}
|
||||
aXbc
|
||||
% echo ${+LPAR()S+RPAR()str%%X*}
|
||||
aXb
|
||||
% )
|
||||
|
||||
(Note that tt(%) and tt(%%) don't search for the match that ends closest to the
|
||||
end of the string, as one might expect.)
|
||||
|
||||
With substitution via tt(${)...tt(/)...tt(}) or
|
||||
tt(${)...tt(//)...tt(}), specifies non-greedy matching, i.e. that the
|
||||
shortest instead of the longest match should be replaced.
|
||||
shortest instead of the longest match should be replaced:
|
||||
|
||||
example(% str="abab"
|
||||
% echo ${str/*b/_}
|
||||
_
|
||||
% echo ${+LPAR()S+RPAR()str/*b/_}
|
||||
_ab
|
||||
% )
|
||||
)
|
||||
item(tt(I:)var(expr)tt(:))(
|
||||
Search the var(expr)th match (where var(expr) evaluates to a number).
|
||||
|
@ -2264,12 +2302,13 @@ parentheses can be referenced.
|
|||
|
||||
For example,
|
||||
|
||||
example(foo="a string with a message"
|
||||
if [[ $foo = (a|an)' '(#b)(*)' '* ]]; then
|
||||
example(foo="a_string_with_a_message"
|
||||
if [[ $foo = (a|an)_(#b)(*) ]]; then
|
||||
print ${foo[$mbegin[1],$mend[1]]}
|
||||
fi)
|
||||
|
||||
prints `tt(string with a)'. Note that the first parenthesis is before the
|
||||
prints `tt(string_with_a_message)'.
|
||||
Note that the first set of parentheses is before the
|
||||
tt((#b)) and does not create a backreference.
|
||||
|
||||
Backreferences work with all forms of pattern matching other than filename
|
||||
|
@ -2492,11 +2531,11 @@ therefore matches files in the current directory as well as
|
|||
subdirectories.
|
||||
Thus:
|
||||
|
||||
example(ls (*/)#bar)
|
||||
example(ls -ld -- (*/)#bar)
|
||||
|
||||
or
|
||||
|
||||
example(ls **/bar)
|
||||
example(ls -ld -- **/bar)
|
||||
|
||||
does a recursive directory search for files named `tt(bar)' (potentially
|
||||
including the file `tt(bar)' in the current directory). This form does not
|
||||
|
@ -2511,11 +2550,11 @@ they are treated as if both a tt(/) plus a further tt(*) are present.
|
|||
Hence:
|
||||
|
||||
example(setopt GLOBSTARSHORT
|
||||
ls **.c)
|
||||
ls -ld -- **.c)
|
||||
|
||||
is equivalent to
|
||||
|
||||
example(ls **/*.c)
|
||||
example(ls -ld -- **/*.c)
|
||||
subsect(Glob Qualifiers)
|
||||
cindex(globbing, qualifiers)
|
||||
cindex(qualifiers, globbing)
|
||||
|
@ -2707,7 +2746,7 @@ appropriate test. For example,
|
|||
|
||||
example(nt+LPAR()RPAR() { [[ $REPLY -nt $NTREF ]] }
|
||||
NTREF=reffile
|
||||
ls -l *(+nt))
|
||||
ls -ld -- *(+nt))
|
||||
|
||||
lists all files in the directory that have been modified more recently than
|
||||
tt(reffile).
|
||||
|
@ -2898,36 +2937,36 @@ is performed, although note that the presence of the parentheses
|
|||
causes the entire expression to be subjected to any global pattern matching
|
||||
options such as tt(NULL_GLOB). Thus:
|
||||
|
||||
example(ls *(-/))
|
||||
example(ls -ld -- *(-/))
|
||||
|
||||
lists all directories and symbolic links that point to directories,
|
||||
and
|
||||
|
||||
example(ls *(-@))
|
||||
example(ls -ld -- *(-@))
|
||||
|
||||
lists all broken symbolic links, and
|
||||
|
||||
example(ls *(%W))
|
||||
example(ls -ld -- *(%W))
|
||||
|
||||
lists all world-writable device files in the current directory, and
|
||||
|
||||
example(ls *(W,X))
|
||||
example(ls -ld -- *(W,X))
|
||||
|
||||
lists all files in the current directory that are
|
||||
world-writable or world-executable, and
|
||||
|
||||
example(echo /tmp/foo*(u0^@:t))
|
||||
example(print -rC1 /tmp/foo*(u0^@:t))
|
||||
|
||||
outputs the basename of all root-owned files beginning with the string
|
||||
`tt(foo)' in tt(/tmp), ignoring symlinks, and
|
||||
|
||||
example(ls *.*~(lex|parse).[ch](^D^l1))
|
||||
example(ls -ld -- *.*~(lex|parse).[ch](^D^l1))
|
||||
|
||||
lists all files having a link count of one whose names contain a dot
|
||||
(but not those starting with a dot, since tt(GLOB_DOTS) is explicitly
|
||||
switched off) except for tt(lex.c), tt(lex.h), tt(parse.c) and tt(parse.h).
|
||||
|
||||
example(print b*.pro+LPAR()#q:s/pro/shmo/+RPAR()(#q.:s/builtin/shmiltin/))
|
||||
example(print -rC1 b*.pro+LPAR()#q:s/pro/shmo/+RPAR()(#q.:s/builtin/shmiltin/))
|
||||
|
||||
demonstrates how colon modifiers and other qualifiers may be chained
|
||||
together. The ordinary qualifier `tt(.)' is applied first, then the colon
|
||||
|
|
|
@ -25,7 +25,7 @@ monitored with ZLE descriptor handlers (see ifzman(zmanref(zshzle))\
|
|||
ifnzman(noderef(Zle Builtins))) or manipulated with tt(sysread) and
|
||||
tt(syswrite) (see ifzman(THE ZSH/SYSTEM MODULE in zmanref(zshmodules))\
|
||||
ifnzman(noderef(The zsh/system Module))). em(Warning): Use of tt(sysread)
|
||||
and tt(syswrite) is em(not) recommended, use tt(zpty -r) and tt(zpty -w)
|
||||
and tt(syswrite) is em(not) recommended; use tt(zpty -r) and tt(zpty -w)
|
||||
unless you know exactly what you are doing.
|
||||
)
|
||||
item(tt(zpty) tt(-d) [ var(name) ... ])(
|
||||
|
|
|
@ -17,18 +17,37 @@ item(tt(zstyle -m) var(context) var(style) var(pattern))(
|
|||
This builtin command is used to define and lookup styles. Styles are
|
||||
pairs of names and values, where the values consist of any number of
|
||||
strings. They are stored together with patterns and lookup is done by
|
||||
giving a string, called the `context', which is compared to the
|
||||
patterns. The definition stored for the first matching pattern will be
|
||||
returned.
|
||||
giving a string, called the `em(context)', which is matched against the
|
||||
patterns. The definition stored for the most specific pattern that matches
|
||||
will be returned.
|
||||
|
||||
For ordering of comparisons, patterns are searched from most specific to
|
||||
least specific, and patterns that are equally specific keep the order in
|
||||
which they were defined. A pattern is considered to be more specific
|
||||
A pattern is considered to be more specific
|
||||
than another if it contains more components (substrings separated by
|
||||
colons) or if the patterns for the components are more specific, where
|
||||
simple strings are considered to be more specific than patterns and
|
||||
complex patterns are considered to be more specific than the pattern
|
||||
`tt(*)'.
|
||||
`tt(*)'. A `tt(*)' in the pattern will match zero or more characters
|
||||
in the context; colons are not treated specially in this regard.
|
||||
If two patterns are equally specific, the tie is broken in favour of
|
||||
the pattern that was defined first.
|
||||
|
||||
em(Example)
|
||||
|
||||
For example, to define your preferred form of precipitation depending on which
|
||||
city you're in, you might set the following in your tt(zshrc):
|
||||
|
||||
example(zstyle ':weather:europe:*' preferred-precipitation rain
|
||||
zstyle ':weather:europe:germany:* preferred-precipitation none
|
||||
zstyle ':weather:europe:germany:*:munich' preferred-precipitation snow)
|
||||
|
||||
Then, the fictional `tt(weather)' plugin might run under the hood a command
|
||||
such as
|
||||
|
||||
example(zstyle -s ":weather:${continent}:${country}:${county}:${city}" preferred-precipitation REPLY)
|
||||
|
||||
in order to retrieve your preference into the scalar variable tt($REPLY).
|
||||
|
||||
em(Usage)
|
||||
|
||||
The first form (without arguments) lists the definitions. Styles
|
||||
are shown in alphabetic order and patterns are shown in the order
|
||||
|
@ -39,7 +58,7 @@ tt(zstyle). The optional first argument is a pattern which will be matched
|
|||
against the string supplied as the pattern for the context; note that
|
||||
this means, for example, `tt(zstyle -L ":completion:*")' will
|
||||
match any supplied pattern beginning `tt(:completion:)', not
|
||||
just tt(":completion:*"): use tt(":completion:\*") to match that.
|
||||
just tt(":completion:*"): use tt(':completion:\*') to match that.
|
||||
The optional second argument limits the output to a specific var(style) (not a
|
||||
pattern). tt(-L) is not compatible with any other options.
|
||||
|
||||
|
|
14
Etc/BUGS
14
Etc/BUGS
|
@ -26,16 +26,6 @@ skipped when STTY=... is set for that command
|
|||
41203 and others: Make it easier to maintain C modules out of tree.
|
||||
(May require defining a stable API for modules, see 41254)
|
||||
------------------------------------------------------------------------
|
||||
44007 - Martijn - exit in trap executes rest of function (prints "fn2")
|
||||
[[[
|
||||
trap 'echo $1; exit; echo $2' USR1
|
||||
fn() {
|
||||
echo fn1
|
||||
kill -USR1 $$
|
||||
echo fn2
|
||||
}
|
||||
echo out1
|
||||
fn trap1 trap2
|
||||
echo out2
|
||||
]]]
|
||||
44007 - Martijn - exit in trap executes rest of function
|
||||
See test case in Test/C03traps.ztst.
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -2244,7 +2244,7 @@ sect(What is multibyte input?)
|
|||
zsh will be able to use any such encoding as long as it contains ASCII as
|
||||
a single-octet subset and the system can provide information about other
|
||||
characters. However, in the case of Unicode, UTF-8 is the only one you
|
||||
are likely to enounter that is useful in zsh.
|
||||
are likely to encounter that is useful in zsh.
|
||||
|
||||
(In case you're confused: Unicode is the character set, while UTF-8 is
|
||||
an encoding of it. You might hear about other encodings, such as UCS-2
|
||||
|
|
|
@ -899,7 +899,6 @@ __zni_options_config() {
|
|||
# The "no" prefix is used to indicate options on by default.
|
||||
__zni_apply_defaults -o autocd '' "Change directory given just path." \
|
||||
extendedglob '' "Use additional pattern matching features." \
|
||||
appendhistory '' "Append new history lines instead of overwriting." \
|
||||
'!nomatch' '' "Unmatched patterns cause an error." \
|
||||
'!beep' '' "Beep on errors." \
|
||||
notify '' "Immediately report changes in background job status."
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# With first argument including n, don't change to the old directory; else do.
|
||||
#
|
||||
# Set do_close to 1 if the connection was not previously open, 0 otherwise
|
||||
# With first arguemnt including d, don't set do_close to 1. Broadly
|
||||
# With first argument including d, don't set do_close to 1. Broadly
|
||||
# speaking, we use this mechanism to shut the connection after use
|
||||
# if the connection had been explicitly closed (i.e. didn't time out,
|
||||
# which zftp test investigates) and we are not using a directory
|
||||
|
|
2
Misc/c2z
2
Misc/c2z
|
@ -10,7 +10,7 @@
|
|||
# uses the csh to parse its own dot-files, then processes csh output to
|
||||
# convert the csh settings to zsh.
|
||||
#
|
||||
# When run as a zsh fuction, c2z runs csh as if it were an interactive
|
||||
# When run as a zsh function, c2z runs csh as if it were an interactive
|
||||
# shell whenever the parent zsh is interactive. When run as a shell
|
||||
# script, the -i switch can be used to force this behavior.
|
||||
#
|
||||
|
|
|
@ -1519,7 +1519,7 @@ zccmd_resize(const char *nam, char **args)
|
|||
// is not available.
|
||||
return 0;
|
||||
} else {
|
||||
// Without this call some window moves are innacurate. Tested on
|
||||
// Without this call some window moves are inaccurate. Tested on
|
||||
// OS X ncurses 5.4, Homebrew ncursesw 6.0-2, Arch Linux ncursesw
|
||||
// 6.0, Ubuntu 14.04 ncurses 5.9, FreeBSD ncursesw.so.8
|
||||
//
|
||||
|
|
|
@ -766,7 +766,7 @@ static int remove_tied_name( const char *name ) {
|
|||
|
||||
/*
|
||||
* Unmetafy that:
|
||||
* - duplicates bufer to work on it,
|
||||
* - duplicates buffer to work on it,
|
||||
* - does zalloc of exact size for the new string,
|
||||
* - restores work buffer to original content, to restore strlen
|
||||
*/
|
||||
|
|
|
@ -1552,7 +1552,7 @@ setpmnameddirs(Param pm, HashTable ht)
|
|||
}
|
||||
}
|
||||
|
||||
/* The INTERACTIVE stuff ensures that the dirs are not immediatly removed
|
||||
/* The INTERACTIVE stuff ensures that the dirs are not immediately removed
|
||||
* when the sub-pms are deleted. */
|
||||
|
||||
i = opts[INTERACTIVE];
|
||||
|
|
|
@ -237,7 +237,7 @@ enum {
|
|||
/*
|
||||
* We keep an fd open for communication between the main shell
|
||||
* and forked off bits and pieces. This allows us to know
|
||||
* if something happend in a subshell: mode changed, type changed,
|
||||
* if something happened in a subshell: mode changed, type changed,
|
||||
* connection was closed. If something too substantial happened
|
||||
* in a subshell --- connection opened, ZFTP_USER and ZFTP_PWD changed
|
||||
* --- we don't try to track it because it's too complicated.
|
||||
|
|
|
@ -35,7 +35,7 @@ typedef struct cexpl *Cexpl;
|
|||
typedef struct cmgroup *Cmgroup;
|
||||
typedef struct cmatch *Cmatch;
|
||||
|
||||
/* This is for explantion strings. */
|
||||
/* This is for explanation strings. */
|
||||
|
||||
struct cexpl {
|
||||
int always; /* display even without matches */
|
||||
|
@ -126,8 +126,8 @@ struct cmatch {
|
|||
|
||||
#define CMF_FILE (1<< 0) /* this is a file */
|
||||
#define CMF_REMOVE (1<< 1) /* remove the suffix */
|
||||
#define CMF_ISPAR (1<< 2) /* is paramter expansion */
|
||||
#define CMF_PARBR (1<< 3) /* paramter expansion with a brace */
|
||||
#define CMF_ISPAR (1<< 2) /* is parameter expansion */
|
||||
#define CMF_PARBR (1<< 3) /* parameter expansion with a brace */
|
||||
#define CMF_PARNEST (1<< 4) /* nested parameter expansion */
|
||||
#define CMF_NOLIST (1<< 5) /* should not be listed */
|
||||
#define CMF_DISPLINE (1<< 6) /* display strings one per line */
|
||||
|
|
|
@ -1492,7 +1492,7 @@ set_comp_sep(void)
|
|||
* are specially handled (but currently only if RCQUOTES is not
|
||||
* set, which isn't necessarily correct if the quotes were typed by
|
||||
* the user).
|
||||
* osq: c.f. odq, taking account of Snull's and embeded "'"'s.
|
||||
* osq: c.f. odq, taking account of Snull's and embedded "'"'s.
|
||||
* qttype: type of quotes using standard QT_* definitions.
|
||||
* lsq: when quoting is single quotes (QT_SINGLE), counts the offset
|
||||
* adjustment needed in the word being examined in the lexer loop.
|
||||
|
|
|
@ -1726,7 +1726,7 @@ static Patprog patcomp, filecomp;
|
|||
* lppre/lpsuf -- the path prefix/suffix, unexpanded *
|
||||
* fpre/fsuf -- prefix/suffix of the pathname component the cursor is in *
|
||||
* prpre -- ppre in expanded form usable for opendir *
|
||||
* qipre, qisuf-- ingnored quoted string *
|
||||
* qipre, qisuf-- ignored quoted string *
|
||||
* *
|
||||
* The integer variables hold the lengths of lpre, lsuf, rpre, rsuf, *
|
||||
* fpre, fsuf, lppre, and lpsuf. noreal is non-zero if we have rpre/rsuf. */
|
||||
|
|
|
@ -84,7 +84,7 @@ char *compiprefix,
|
|||
Param *comprpms;
|
||||
|
||||
/*
|
||||
* An array of Param structures for elemens of $compstate; see
|
||||
* An array of Param structures for elements of $compstate; see
|
||||
* 'compkparams' below.
|
||||
*
|
||||
* See CP_KEYPARAMS.
|
||||
|
|
|
@ -1399,7 +1399,7 @@ pattern_match_restrict(Cpattern p, Cpattern wp, convchar_t *wsc, int wsclen,
|
|||
if (prestrict->tp == CPAT_CHAR) {
|
||||
/*
|
||||
* Easy case: restricted to an exact character on
|
||||
* the line. Procede as normal.
|
||||
* the line. Proceed as normal.
|
||||
*/
|
||||
c = prestrict->u.chr;
|
||||
} else {
|
||||
|
|
|
@ -827,7 +827,7 @@ do_ambiguous(void)
|
|||
* if the completion is completely ambiguous') is set, and some *
|
||||
* prefix was inserted, return now, bypassing the list-displaying *
|
||||
* code. On the way, invalidate the list and note that we don't *
|
||||
* want to enter an AUTO_MENU imediately. */
|
||||
* want to enter an AUTO_MENU immediately. */
|
||||
if ((uselist == 3 ||
|
||||
(!uselist && isset(BASHAUTOLIST) && isset(LISTAMBIGUOUS))) &&
|
||||
la && iforcemenu != -1) {
|
||||
|
|
|
@ -967,7 +967,7 @@ struct caarg {
|
|||
#define CAA_RARGS 4
|
||||
#define CAA_RREST 5
|
||||
|
||||
/* The cache of parsed descriptons. */
|
||||
/* The cache of parsed descriptions. */
|
||||
|
||||
#define MAX_CACACHE 8
|
||||
static Cadef cadef_cache[MAX_CACACHE];
|
||||
|
|
|
@ -55,7 +55,7 @@ struct keymapname {
|
|||
HashNode next; /* next in the hash chain */
|
||||
char *nam; /* name of the keymap */
|
||||
int flags; /* various flags (see below) */
|
||||
Keymap keymap; /* the keymap itsef */
|
||||
Keymap keymap; /* the keymap itself */
|
||||
};
|
||||
|
||||
/* Can't be deleted (.safe) */
|
||||
|
|
|
@ -893,7 +893,7 @@ getbyte(long do_keytmout, int *timeout, int full)
|
|||
break;
|
||||
if (r == 0) {
|
||||
/* The test for IGNOREEOF was added to make zsh ignore ^Ds
|
||||
that were typed while commands are running. Unfortuantely
|
||||
that were typed while commands are running. Unfortunately
|
||||
this caused trouble under at least one system (SunOS 4.1).
|
||||
Here shells that lost their xterm (e.g. if it was killed
|
||||
with -9) didn't fail to read from the terminal but instead
|
||||
|
|
|
@ -388,7 +388,7 @@ zle_free_highlight(void)
|
|||
|
||||
/*
|
||||
* Interface to the region_highlight ZLE parameter.
|
||||
* Converts betwen a format like "P32 42 underline,bold" to
|
||||
* Converts between a format like "P32 42 underline,bold" to
|
||||
* the format in the region_highlights variable. Note that
|
||||
* the region_highlights variable stores the internal (point/mark)
|
||||
* region in element zero.
|
||||
|
|
|
@ -1236,8 +1236,10 @@ get_comp_string(void)
|
|||
else if (tok == OUTPAR) {
|
||||
if (parct)
|
||||
parct--;
|
||||
else
|
||||
else if (linarr) {
|
||||
linarr = 0;
|
||||
incmdpos = 1;
|
||||
}
|
||||
}
|
||||
if (inredir && IS_REDIROP(tok)) {
|
||||
rdstr = rdstrbuf;
|
||||
|
|
|
@ -7287,8 +7287,11 @@ bin_umask(char *nam, char **args, Options ops, UNUSED(int func))
|
|||
char *s = *args;
|
||||
|
||||
/* Get the current umask. */
|
||||
um = umask(0);
|
||||
queue_signals();
|
||||
um = umask(0777);
|
||||
umask(um);
|
||||
unqueue_signals();
|
||||
|
||||
/* No arguments means to display the current setting. */
|
||||
if (!s) {
|
||||
if (OPT_ISSET(ops,'S')) {
|
||||
|
|
|
@ -3059,7 +3059,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr,
|
|||
case (SUB_END|SUB_SUBSTR):
|
||||
case (SUB_END|SUB_LONG|SUB_SUBSTR):
|
||||
/* Longest/shortest at end, matching substrings. */
|
||||
if (!(fl & SUB_LONG)) {
|
||||
{
|
||||
set_pat_start(p, l);
|
||||
if (pattrylen(p, send, 0, 0, &patstralloc, umltot) &&
|
||||
!--n) {
|
||||
|
@ -3397,7 +3397,7 @@ igetmatch(char **sp, Patprog p, int fl, int n, char *replstr,
|
|||
case (SUB_END|SUB_SUBSTR):
|
||||
case (SUB_END|SUB_LONG|SUB_SUBSTR):
|
||||
/* Longest/shortest at end, matching substrings. */
|
||||
if (!(fl & SUB_LONG)) {
|
||||
{
|
||||
set_pat_start(p, l);
|
||||
if (pattrylen(p, send, 0, 0, &patstralloc, uml) && !--n) {
|
||||
*sp = get_match_ret(&imd, uml, uml);
|
||||
|
|
10
Src/hist.c
10
Src/hist.c
|
@ -3321,6 +3321,7 @@ bufferwords(LinkList list, char *buf, int *index, int flags)
|
|||
int owb = wb, owe = we, oadx = addedx, onc = nocomments;
|
||||
int ona = noaliases, ocs = zlemetacs, oll = zlemetall;
|
||||
int forloop = 0, rcquotes = opts[RCQUOTES];
|
||||
int envarray = 0;
|
||||
char *p, *addedspaceptr;
|
||||
|
||||
if (!list)
|
||||
|
@ -3404,6 +3405,14 @@ bufferwords(LinkList list, char *buf, int *index, int flags)
|
|||
ctxtlex();
|
||||
if (tok == ENDINPUT || tok == LEXERR)
|
||||
break;
|
||||
/*
|
||||
* After an array assignment, return to the initial
|
||||
* start-of-command state. There could be a second ENVARRAY.
|
||||
*/
|
||||
if (tok == OUTPAR && envarray) {
|
||||
incmdpos = 1;
|
||||
envarray = 0;
|
||||
}
|
||||
if (tok == FOR) {
|
||||
/*
|
||||
* The way for (( expr1 ; expr2; expr3 )) is parsed is:
|
||||
|
@ -3441,6 +3450,7 @@ bufferwords(LinkList list, char *buf, int *index, int flags)
|
|||
switch (tok) {
|
||||
case ENVARRAY:
|
||||
p = dyncat(tokstr, "=(");
|
||||
envarray = 1;
|
||||
break;
|
||||
|
||||
case DINPAR:
|
||||
|
|
|
@ -2492,7 +2492,7 @@ pattryrefs(Patprog prog, char *string, int stringlen, int unmetalenin,
|
|||
* Optimization: if we didn't find any Meta characters
|
||||
* to begin with, we don't need to look for them now.
|
||||
*
|
||||
* For patstralloc pased in, we want the unmetafied length.
|
||||
* For patstralloc passed in, we want the unmetafied length.
|
||||
*/
|
||||
if (patstralloc == &patstralloc_struct &&
|
||||
patstralloc->unmetalen != origlen) {
|
||||
|
|
|
@ -250,7 +250,7 @@ strmetasort(char **array, int sortwhat, int *unmetalenp)
|
|||
if (unmetalenp) {
|
||||
/*
|
||||
* Already unmetafied. We just need to check for
|
||||
* embededded nulls.
|
||||
* embedded nulls.
|
||||
*/
|
||||
int count = unmetalenp[arrptr-array];
|
||||
/* Remember this length for sorted array */
|
||||
|
|
|
@ -287,9 +287,7 @@ zerrmsg(FILE *file, const char *fmt, va_list ap)
|
|||
{
|
||||
const char *str;
|
||||
int num;
|
||||
#ifdef DEBUG
|
||||
long lnum;
|
||||
#endif
|
||||
#ifdef HAVE_STRERROR_R
|
||||
#define ERRBUFSIZE (80)
|
||||
int olderrno;
|
||||
|
@ -325,12 +323,10 @@ zerrmsg(FILE *file, const char *fmt, va_list ap)
|
|||
nicezputs(s, file);
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
case 'L':
|
||||
lnum = va_arg(ap, long);
|
||||
fprintf(file, "%ld", lnum);
|
||||
break;
|
||||
#endif
|
||||
case 'd':
|
||||
num = va_arg(ap, int);
|
||||
fprintf(file, "%d", num);
|
||||
|
|
|
@ -1254,7 +1254,7 @@ enum {
|
|||
|
||||
/*
|
||||
* Assignment has value?
|
||||
* If the assignment is an arrray, then it certainly has a value --- we
|
||||
* If the assignment is an array, then it certainly has a value --- we
|
||||
* can only tell if there's an explicit assignment.
|
||||
*/
|
||||
|
||||
|
@ -2999,7 +2999,7 @@ struct sortelt {
|
|||
int origlen;
|
||||
/*
|
||||
* The length of the string, if needed, else -1.
|
||||
* The length is only needed if there are embededded nulls.
|
||||
* The length is only needed if there are embedded nulls.
|
||||
*/
|
||||
int len;
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
* shell initialisation.
|
||||
*/
|
||||
#define ZTF_INIT (0x0001) /* One-off initialisation done */
|
||||
#define ZTF_INTERACT (0x0002) /* Shell interative and reading from stdin */
|
||||
#define ZTF_INTERACT (0x0002) /* Shell interactive and reading from stdin */
|
||||
#define ZTF_SP_COMMA (0x0004) /* Treat comma as a special characters */
|
||||
#define ZTF_BANGCHAR (0x0008) /* Treat bangchar as a special character */
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
# stderr.
|
||||
#
|
||||
# The rules for '<', '>' and '?' lines are the same: only the first
|
||||
# character is stripped (with the excpetion for '*' noted below), with
|
||||
# character is stripped (with the exception for '*' noted below), with
|
||||
# subsequent whitespace being significant; lines are not subject to any
|
||||
# substitution unless the `q' flag (see below) is set.
|
||||
#
|
||||
|
@ -70,11 +70,13 @@
|
|||
# the expected status returned by the code when run, or - if it is
|
||||
# irrelevant. An optional set of single-letter flags follows the status
|
||||
# or -. The following are understood:
|
||||
# . d Don't diff stdout against the expected stdout.
|
||||
# . d Don't diff stdout against the expected stdout.
|
||||
# D Don't diff stderr against the expected stderr.
|
||||
# q All redirection lines given in the test script (not the lines
|
||||
# actually produced by the test) are subject to ordinary quoted shell
|
||||
# expansion (i.e. not globbing).
|
||||
# f Test is expected to fail. If the test's exit code, stdout, and stderr
|
||||
# match, report a problem; otherwise, carry on to the next test case.
|
||||
# This can be followed by a `:' and a message describing the
|
||||
# test, which will be printed if the test fails, along with a
|
||||
# description of the failure that occurred. The `:' and message are
|
||||
|
@ -106,7 +108,7 @@
|
|||
# ZTST_skip: Set this in any test case if that single test case is to be
|
||||
# skipped. Testing resumes at the next test case in the same file.
|
||||
#
|
||||
# Syntax highlighting for Vim is available, see Util/ztst.vim.
|
||||
# Syntax highlighting for Vim is available, see Util/ztst-*.vim.
|
||||
cd cdtst.tmp/sub/fake &&
|
||||
pwd &&
|
||||
print $PWD
|
||||
|
|
|
@ -881,6 +881,23 @@ F:Must be tested with a top-level script rather than source or function
|
|||
$ZTST_testdir/../Src/zsh -f <<<'fn() { exit 0; }; trap fn EXIT; false'
|
||||
0:Explicit exit status overrides implicit: script-like code path
|
||||
|
||||
$ZTST_testdir/../Src/zsh -f <<<$'
|
||||
trap \'echo $1; exit; echo $2\' USR1
|
||||
fn() {
|
||||
echo fn1
|
||||
kill -s USR1 $$
|
||||
echo fn2
|
||||
}
|
||||
echo out1
|
||||
fn trap1 trap2
|
||||
echo out2
|
||||
'
|
||||
-f:(workers/44007) function execution continues after 'exit' in trap
|
||||
>out1
|
||||
>fn1
|
||||
>trap1
|
||||
# As of 5.7.1-test-2, the output was "out1 fn1 trap1 fn2" (on separate lines).
|
||||
|
||||
%clean
|
||||
|
||||
rm -f TRAPEXIT
|
||||
|
|
|
@ -728,3 +728,21 @@
|
|||
>does/not/exist
|
||||
>not/exist
|
||||
>exist
|
||||
|
||||
mkdir -m 000 glob.tmp/secret-d000
|
||||
mkdir -m 111 glob.tmp/secret-d111
|
||||
mkdir -m 444 glob.tmp/secret-d444
|
||||
for 1 in 000 111 444 ; do ln -s secret-d$1 glob.tmp/secret-s$1; done
|
||||
print -rC 2 -- glob.tmp/secret-*/ glob.tmp/secret-*(-/)
|
||||
-f:unreadable directories can be globbed (users/24619, users/24626)
|
||||
>glob.tmp/secret-d000/ glob.tmp/secret-d000
|
||||
>glob.tmp/secret-d111/ glob.tmp/secret-d111
|
||||
>glob.tmp/secret-d444/ glob.tmp/secret-d444
|
||||
>glob.tmp/secret-s000/ glob.tmp/secret-s000
|
||||
>glob.tmp/secret-s111/ glob.tmp/secret-s111
|
||||
>glob.tmp/secret-s444/ glob.tmp/secret-s444
|
||||
|
||||
%clean
|
||||
|
||||
# Fix unreadable-directory permissions so ztst can clean up properly
|
||||
chmod +rwx glob.tmp/secret-*(N) 2> /dev/null
|
||||
|
|
|
@ -640,6 +640,74 @@
|
|||
>echo
|
||||
>$(|||) bar
|
||||
|
||||
argv=(
|
||||
$'a=() b=()'
|
||||
$'a=(foo) b=(bar)'
|
||||
$'a=(foo) b=() c=() d=(bar) e=(baz) f=() g=()'
|
||||
$'a=(foo) b=() c=() d=(bar)\ne=(baz) f=() g=()'
|
||||
$'a=(foo) b=() d=(bar)'
|
||||
)
|
||||
for 1; print -rl -- ${(z)1} && print
|
||||
0:${(z)} regression test: multiple array assignments
|
||||
>a=(
|
||||
>)
|
||||
>b=(
|
||||
>)
|
||||
>
|
||||
>a=(
|
||||
>foo
|
||||
>)
|
||||
>b=(
|
||||
>bar
|
||||
>)
|
||||
>
|
||||
>a=(
|
||||
>foo
|
||||
>)
|
||||
>b=(
|
||||
>)
|
||||
>c=(
|
||||
>)
|
||||
>d=(
|
||||
>bar
|
||||
>)
|
||||
>e=(
|
||||
>baz
|
||||
>)
|
||||
>f=(
|
||||
>)
|
||||
>g=(
|
||||
>)
|
||||
>
|
||||
>a=(
|
||||
>foo
|
||||
>)
|
||||
>b=(
|
||||
>)
|
||||
>c=(
|
||||
>)
|
||||
>d=(
|
||||
>bar
|
||||
>)
|
||||
>;
|
||||
>e=(
|
||||
>baz
|
||||
>)
|
||||
>f=(
|
||||
>)
|
||||
>g=(
|
||||
>)
|
||||
>
|
||||
>a=(
|
||||
>foo
|
||||
>)
|
||||
>b=(
|
||||
>)
|
||||
>d=(
|
||||
>bar
|
||||
>)
|
||||
>
|
||||
|
||||
foo=$'\x06ZUI\x1f text-field example: \x1azuitfieldtfield1_1\x1a\'\'\x1a\'\'\x1a1\x1aZUI\\[my_tfield1_width\\]\x1aZUI\\[my_tfield1_start\\]\x1aZUI\\[my_tfield1_data\\]\x1c'
|
||||
print "${#${(z@)foo}}"
|
||||
0:Test real-world data that once seemed to fail
|
||||
|
@ -2444,7 +2512,7 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
|
|||
local -a x
|
||||
: <<< ${(F)x/y}
|
||||
}
|
||||
0:Separation / join logic regresssion test
|
||||
0:Separation / join logic regression test
|
||||
|
||||
testpath=/one/two/three/four
|
||||
for (( i = 0; i <= 6; ++i )); do
|
||||
|
@ -2557,3 +2625,28 @@ F:behavior, see http://austingroupbugs.net/view.php?id=888
|
|||
print ${foo%%*}
|
||||
0:Largest match at end matches entire string
|
||||
>
|
||||
|
||||
foo=pws
|
||||
print 1: ${(S)foo#*}
|
||||
print 2: ${(S)foo##*}
|
||||
print 3: ${(S)foo#?}
|
||||
print 4: ${(S)foo##?}
|
||||
0:(S) with zero-length matches at start
|
||||
>1: pws
|
||||
>2:
|
||||
>3: ws
|
||||
>4: ws
|
||||
|
||||
foo=pws
|
||||
print 2: ${(S)foo%%*}
|
||||
0:(S) with zero-length matches at end, part 1 (workers/45164)
|
||||
>2: pws
|
||||
|
||||
foo=pws
|
||||
print 1: ${(S)foo%*}
|
||||
print 3: ${(S)foo%?}
|
||||
print 4: ${(S)foo%%?}
|
||||
0:(S) with zero-length matches at end, part 2
|
||||
>1: pws
|
||||
>3: pw
|
||||
>4: pw
|
||||
|
|
|
@ -157,5 +157,3 @@
|
|||
%clean
|
||||
|
||||
zmodload -ui zsh/zpty
|
||||
|
||||
# vim:ft=zsh
|
||||
|
|
|
@ -216,6 +216,15 @@ F:regression test workers/31611
|
|||
>NO:{3pm}
|
||||
>NO:{10pm}
|
||||
|
||||
comptest $'a=() b=(\t'
|
||||
0:multiple envarrays
|
||||
>line: {a=() b=(}{}
|
||||
>DESCRIPTION:{file}
|
||||
>DI:{dir1}
|
||||
>DI:{dir2}
|
||||
>FI:{file1}
|
||||
>FI:{file2}
|
||||
|
||||
%clean
|
||||
|
||||
zmodload -ui zsh/zpty
|
||||
|
|
5
Test/list-XFails
Executable file
5
Test/list-XFails
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# This script lists tests that are currently expected to fail. (I.e., tests
|
||||
# for bugs that haven't been fixed yet.)
|
||||
|
||||
grep --color -E -n '^[-0-9.dDqf]*f[-0-9.dDqf]*:' -- "$(dirname -- "$0")"/*.ztst
|
|
@ -366,6 +366,7 @@ ZTST_test() {
|
|||
local last match mbegin mend found substlines
|
||||
local diff_out diff_err
|
||||
local ZTST_skip
|
||||
integer expected_to_fail
|
||||
|
||||
while true; do
|
||||
rm -f $ZTST_in $ZTST_out $ZTST_err
|
||||
|
@ -460,8 +461,21 @@ $ZTST_curline"
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ $ZTST_flags = *f* ]]; then
|
||||
expected_to_fail=1
|
||||
ZTST_xfail_diff() { ZTST_diff "$@" > /dev/null }
|
||||
ZTST_diff=ZTST_xfail_diff
|
||||
else
|
||||
expected_to_fail=0
|
||||
ZTST_diff=ZTST_diff
|
||||
fi
|
||||
|
||||
# First check we got the right status, if specified.
|
||||
if [[ $ZTST_xstatus != - && $ZTST_xstatus != $ZTST_status ]]; then
|
||||
if (( expected_to_fail )); then
|
||||
ZTST_verbose 1 "Test failed, as expected."
|
||||
continue
|
||||
fi
|
||||
ZTST_testfailed "bad status $ZTST_status, expected $ZTST_xstatus from:
|
||||
$ZTST_code${$(<$ZTST_terr):+
|
||||
Error output:
|
||||
|
@ -480,7 +494,11 @@ $(<$ZTST_terr)"
|
|||
rm -rf $ZTST_out
|
||||
print -r -- "${(e)substlines}" >$ZTST_out
|
||||
fi
|
||||
if [[ $ZTST_flags != *d* ]] && ! ZTST_diff $diff_out -u $ZTST_out $ZTST_tout; then
|
||||
if [[ $ZTST_flags != *d* ]] && ! $ZTST_diff $diff_out -u $ZTST_out $ZTST_tout; then
|
||||
if (( expected_to_fail )); then
|
||||
ZTST_verbose 1 "Test failed, as expected."
|
||||
continue
|
||||
fi
|
||||
ZTST_testfailed "output differs from expected as shown above for:
|
||||
$ZTST_code${$(<$ZTST_terr):+
|
||||
Error output:
|
||||
|
@ -492,11 +510,19 @@ $(<$ZTST_terr)}"
|
|||
rm -rf $ZTST_err
|
||||
print -r -- "${(e)substlines}" >$ZTST_err
|
||||
fi
|
||||
if [[ $ZTST_flags != *D* ]] && ! ZTST_diff $diff_err -u $ZTST_err $ZTST_terr; then
|
||||
if [[ $ZTST_flags != *D* ]] && ! $ZTST_diff $diff_err -u $ZTST_err $ZTST_terr; then
|
||||
if (( expected_to_fail )); then
|
||||
ZTST_verbose 1 "Test failed, as expected."
|
||||
continue
|
||||
fi
|
||||
ZTST_testfailed "error output differs from expected as shown above for:
|
||||
$ZTST_code"
|
||||
return 1
|
||||
fi
|
||||
if (( expected_to_fail )); then
|
||||
ZTST_testfailed "test was expected to fail, but passed."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
ZTST_verbose 1 "Test successful."
|
||||
[[ -n $last ]] && break
|
||||
|
|
29
Util/ztst-ftplugin.vim
Normal file
29
Util/ztst-ftplugin.vim
Normal file
|
@ -0,0 +1,29 @@
|
|||
" ztst filetype plugin
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Inherit zsh.vim
|
||||
runtime! ftplugin/zsh.vim
|
||||
|
||||
let b:undo_ftplugin .= "| setl fo< comments< commentstring<"
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
setlocal fo-=t fo+=croql
|
||||
|
||||
" Set 'comments' to format expected output/errput lines
|
||||
setlocal comments+=:*>,:>,:*?,:?,:F:
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &textwidth == 0
|
||||
setlocal textwidth=78
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
|
@ -28,7 +28,7 @@ syn include @zsh syntax/zsh.vim
|
|||
syn match ztstPayload /^\s\+\zs.*/ contains=@zsh
|
||||
|
||||
syn match ztstExitCode /^\d\+\|^-/ nextgroup=ztstFlags
|
||||
syn match ztstFlags /[.dDq]*:/ contained nextgroup=ztstTestName contains=ztstColon
|
||||
syn match ztstFlags /[.dDqf]*:/ contained nextgroup=ztstTestName contains=ztstColon
|
||||
syn match ztstColon /:/ contained
|
||||
syn region ztstTestName start=// end=/$/ contained
|
||||
|
||||
|
@ -58,6 +58,16 @@ syn match ztstComment /^#.*/
|
|||
" harness to the test files.
|
||||
syn keyword ztstSpecialVariable ZTST_unimplemented ZTST_skip ZTST_testdir ZTST_fd ZTST_srcdir containedin=@zsh
|
||||
|
||||
"" Sync
|
||||
" The following is sufficient for our modest line-based format, and helps
|
||||
" sidestep problems resulting from test cases that use syntax constructs
|
||||
" that confuse us and/or syntax/zsh.vim. If we outgrow it, we should sync
|
||||
" on empty lines instead.
|
||||
"
|
||||
" If you run into syntax highlighting issues, just scroll the line that throws
|
||||
" the syntax highlighting off off the top of the screen.
|
||||
syn sync maxlines=1
|
||||
|
||||
"" Highlight groups:
|
||||
hi def link ztstExitCode Number
|
||||
hi def link ztstFlags Normal
|
|
@ -21,7 +21,10 @@
|
|||
" xitem(foo)
|
||||
" item(foo)(foo)
|
||||
" sitem(foo)(foo foo)
|
||||
" COMMENT(foo var(foo) foo)
|
||||
" comment(foo)
|
||||
" example(print *.c+LPAR()#q:s/#%+LPAR()#b+RPAR()s+LPAR()*+RPAR().c/'S${match[1]}.C'/+RPAR())
|
||||
" example(zargs -- **/*(.) -- ls -l)
|
||||
" ifzman(zmanref(zshmisc))ifnzman(noderef(Redirection))
|
||||
" LPAR()foo 42 foo+RPAR()
|
||||
" chapter(foo (foo) foo)
|
||||
|
@ -50,7 +53,10 @@ syn match zyodlSpecial "+\?\<\(LPAR\|RPAR\|PLUS\)()"
|
|||
syn match zyodlNumber "\d\+"
|
||||
syn region zyodlItem start="\<xitem(" end=")" contains=zyodlSpecial,@zyodlInline
|
||||
syn region zyodlItem start="\<item(" end=")" contains=zyodlSpecial,@zyodlInline
|
||||
syn region zyodlExample start="\<example(" end=")" contains=zyodlSpecial
|
||||
syn region zyodlExample start="\<example(" end=")" contains=zyodlSpecial,zyodlParenthetical
|
||||
syn region zyodlComment start="\<COMMENT(" end=")" contains=zyodlSpecial,@zyodlInline,zyodlParenthetical
|
||||
" comment that gets output in generated texinfo/roff source
|
||||
syn region zyodlComment start="\<comment(" end=")"
|
||||
syn region zyodlTitle start="\<\(chapter\|subsect\|sect\)(" end=")" contains=zyodlSpecial,@zyodlInline,zyodlParenthetical
|
||||
syn match zyodlTitle "^texinode(.*$"
|
||||
syn region zyodlParenthetical start="\w\@<!(" end=")" transparent contained contains=zyodlParenthetical
|
||||
|
@ -70,11 +76,12 @@ hi def link zyodlVar Identifier
|
|||
" Not ':hi def link zyodlBold Bold' since there's no such group.
|
||||
hi def zyodlBold gui=bold cterm=bold
|
||||
hi def link zyodlEmph Type
|
||||
hi def link zyodlIndex Comment
|
||||
hi def link zyodlIndex PreProc
|
||||
hi def link zyodlSpecial Special
|
||||
hi def link zyodlNumber Number
|
||||
hi def link zyodlItem Keyword
|
||||
hi def link zyodlExample String
|
||||
hi def link zyodlComment Comment
|
||||
hi def link zyodlTitle Title
|
||||
hi def link zyodlCond Conditional
|
||||
hi def link zyodlRef Include
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -2060,17 +2060,9 @@ dnl be good enough.
|
|||
AH_TEMPLATE([PATH_DEV_FD],
|
||||
[Define to the path of the /dev/fd filesystem.])
|
||||
AC_CACHE_CHECK(for /dev/fd filesystem, zsh_cv_sys_path_dev_fd,
|
||||
[if test "$host_os" = cygwin; then
|
||||
dnl In current (2008/12/01) versions of Cygwin these are present but don't
|
||||
dnl seem to work smoothly for process substitution; no great surprise
|
||||
dnl since getting processes to work at all on Cygwin is a big challenge.
|
||||
dnl We'll rely on FIFOs, since they do what we need.
|
||||
zsh_cv_sys_path_dev_fd=no
|
||||
else
|
||||
[for zsh_cv_sys_path_dev_fd in /proc/self/fd /dev/fd no; do
|
||||
test x`echo ok|(exec 3<&0; cat $zsh_cv_sys_path_dev_fd/3 2>/dev/null;)` = xok && break
|
||||
done]
|
||||
fi])
|
||||
done])
|
||||
if test x$zsh_cv_sys_path_dev_fd != xno; then
|
||||
AC_DEFINE_UNQUOTED(PATH_DEV_FD, "$zsh_cv_sys_path_dev_fd")
|
||||
fi
|
||||
|
@ -2261,14 +2253,9 @@ dnl -----------
|
|||
dnl named FIFOs
|
||||
dnl -----------
|
||||
dnl
|
||||
dnl Named FIFOs work well enough on recent versions of Cygwin
|
||||
dnl to provide what we want. Simply enable them.
|
||||
AC_CACHE_CHECK(if named FIFOs work,
|
||||
zsh_cv_sys_fifo,
|
||||
[if test "$host_os" = cygwin; then
|
||||
zsh_cv_sys_fifo=yes
|
||||
else
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
main()
|
||||
|
@ -2296,7 +2283,7 @@ main()
|
|||
exit(ret);
|
||||
}
|
||||
]])],[zsh_cv_sys_fifo=yes],[zsh_cv_sys_fifo=no],[zsh_cv_sys_fifo=yes])
|
||||
fi])
|
||||
])
|
||||
AH_TEMPLATE([HAVE_FIFOS],
|
||||
[Define to 1 if system has working FIFOs.])
|
||||
if test x$zsh_cv_sys_fifo = xyes; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue