mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
49765: _less: add option --color as synonym for -D
This commit is contained in:
parent
45182eb4d4
commit
a692b980cb
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2022-02-23 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 49765: Completion/Unix/Command/_less: add option --color
|
||||
as synonym for -D
|
||||
|
||||
2022-02-22 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* unposted: Doc/Zsh/contrib.yo, Src/Modules/parameter.c,
|
||||
|
|
|
@ -39,7 +39,7 @@ _arguments -S -s -A "[-+]*" \
|
|||
'(-C --CLEAR-SCREEN -c --clear-screen)'{-c,--clear-screen}'[repaint screen instead of scrolling]' \
|
||||
'!(-c --clear-screen)'{-C,--CLEAR-SCREEN} \
|
||||
'(-d --dumb)'{-d,--dumb}'[suppress error message if terminal is dumb]' \
|
||||
'*-D+[set screen colors]: :->colors' \
|
||||
'*'{-D+,--color=}'[set screen colors]: :->colors' \
|
||||
'(-e -E --quit-at-eof --QUIT-AT-EOF)'{-e,--quit-at-eof}'[exit the second time end-of-file is reached]' \
|
||||
'(-e -E --quit-at-eof --QUIT-AT-EOF)'{-E,--QUIT-AT-EOF}'[exit when end-of-file is reached]' \
|
||||
'(-f --force)'{-f,--force}'[force opening of non-regular files]' \
|
||||
|
@ -104,7 +104,7 @@ if [[ -n "$state" ]]; then
|
|||
if compset -P 1 \?; then
|
||||
[[ $IPREFIX[-1] != [a-z] ]] || compset -P 1 + || _describe 'color application' '( +:add\ to\ existing\ attribute )'
|
||||
suf=( -S '' )
|
||||
compset -P 1 '([a-zA-Z]|*.)' && fgbg=background && suf=()
|
||||
compset -P 1 '([-a-zA-Z]|*.)' && fgbg=background && suf=()
|
||||
basic=( B:blue C:cyan G:green K:black M:magenta R:red W:white Y:yellow )
|
||||
_describe -t colors "$fgbg color" \
|
||||
"( -:default ${(j. .)${(@)basic/:/:light\ }} ${(Lj. .)basic} )" "$suf[@]" && ret=0
|
||||
|
|
Loading…
Reference in a new issue