about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2022-02-23 11:24:39 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2022-02-23 11:24:39 +0900
commita692b980cb895143e073ac2e3fccf5ad0760eafe (patch)
tree5c38d9b760b4f16068ac43b842f03b79414b3179 /Completion
parent45182eb4d447a6fbf5f76538326e1a944880ea52 (diff)
downloadzsh-a692b980cb895143e073ac2e3fccf5ad0760eafe.tar.gz
zsh-a692b980cb895143e073ac2e3fccf5ad0760eafe.tar.xz
zsh-a692b980cb895143e073ac2e3fccf5ad0760eafe.zip
49765: _less: add option --color as synonym for -D
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_less4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_less b/Completion/Unix/Command/_less
index ae912a633..0a72782ef 100644
--- a/Completion/Unix/Command/_less
+++ b/Completion/Unix/Command/_less
@@ -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