mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-17 09:08:04 +02:00
52037: complete only external commands for env/watch
also includes a few minor fixes for _date, _env and _watch
This commit is contained in:
parent
40a6265aa3
commit
9b9870a6dc
4 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2023-08-14 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 52037: Completion/Unix/Command/_date,
|
||||
Completion/Unix/Command/_env, Completion/Unix/Command/_watch:
|
||||
complete only external commands for env and watch, with a few
|
||||
more minor fixes
|
||||
|
||||
2023-08-06 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Shohei YOSHIDA: 52018: Completion/Unix/Command/_wc: latest
|
||||
|
|
|
@ -19,7 +19,7 @@ if _pick_variant gnu="Free Software Foundation" unix --version; then
|
|||
$f{-R,--rfc-email}'[display in RFC5322 format]'
|
||||
$f'--rfc-3339=-[display in RFC 3339 format]:precision:(date seconds ns)'
|
||||
'(-u --utc --universal)'{-u,--utc,--universal}'[display or set time in UTC]'
|
||||
'--resolution[output the available resolution of timestamps]'
|
||||
$d'--resolution[output the available resolution of timestamps]'
|
||||
'(- :)--help[output help and exit]'
|
||||
'(- :)--version[output version info and exit]'
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ case $variant in
|
|||
(( $#words > 2 )) && ign='!'
|
||||
args=(
|
||||
'(-)'{-i,--ignore-environment}'[start with empty environment]'
|
||||
'(-0 --null)'{-0,--null}'[end each output line with NUL, not newline]'
|
||||
'(* -0 --null)'{-0,--null}'[end each output line with NUL, not newline]'
|
||||
'(--ignore-environment -i --help --version)*'{-u+,--unset=}'[remove variable from the environment]:env var to remove:_parameters -g "*export*"'
|
||||
'(-C --chdir)'{-C+,--chdir=}'[change working directory]:directory:_directories'
|
||||
'(-S --split-string)'{-S+,--split-string=}'[perform word splitting]:string to split'
|
||||
|
@ -59,7 +59,7 @@ if [[ -n $state ]]; then
|
|||
shift words
|
||||
(( CURRENT-- ))
|
||||
done
|
||||
_normal && ret=0
|
||||
_normal -p env && ret=0
|
||||
;;
|
||||
user-class)
|
||||
if compset -P 1 '*/'; then
|
||||
|
|
|
@ -18,7 +18,7 @@ case $variant in
|
|||
'(-g --chgexit)'{-g,--chgexit}'[exit on command output change]' \
|
||||
'(-n --interval)'{-n+,--interval=}'[specify update interval]:update interval (seconds) [2]' \
|
||||
'(-p --precise)'{-p,--precise}'[run command at precise intervals]' \
|
||||
'(-q --equexit)'{-q,--equexit}'[exit when output of command does not change for the given cycles]:cycles' \
|
||||
'(-q --equexit)'{-q+,--equexit=}'[exit when output of command does not change for the given cycles]:cycles' \
|
||||
'(-r --no-rerun)'{-r,--no-rerun}'[do not run the program on terminal resize]' \
|
||||
'(-t --no-title)'{-t,--no-title}'[disable header]' \
|
||||
'(-w --no-wrap)'{-w,--no-wrap}'[disable line wrapping]' \
|
||||
|
@ -34,7 +34,7 @@ case $variant in
|
|||
then
|
||||
_cmdstring && ret=0
|
||||
else
|
||||
_normal && ret=0
|
||||
_normal -p watch && ret=0
|
||||
fi
|
||||
;;
|
||||
# watch(1) has completely different semantics on freebsd compared to linux, hence:
|
||||
|
|
Loading…
Reference in a new issue