From 93458d9148e9b2c8d058fafea46a5a73aa4ee27d Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 3 Dec 1999 16:38:21 +0000 Subject: zsh-workers/8874 --- Completion/Base/_arguments | 3 ++- Completion/User/_use_lo | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments index 0170ce307..591cb6ac7 100644 --- a/Completion/Base/_arguments +++ b/Completion/Base/_arguments @@ -71,6 +71,7 @@ if (( long )); then lopts=("--${(@)^${(@)${(@)${(@M)${(@ps:\n:j:\n:)${(@)${(@M)${(@f)$(${~words[1]} --help 2>&1)//\[--/ --}:#[ ]#-*}//,/ }}:#[ ]#--*}#*--}%%[], ]*}:#}") + lopts=( "${(@)lopts:#--}" ) # Now remove all ignored options ... @@ -163,7 +164,7 @@ done _style -s options auto-description autod -if comparguments -i "$autod" "$@"; then +if (( $# )) && comparguments -i "$autod" "$@"; then local nm="$compstate[nmatches]" action noargs aret expl local local next direct odirect equal single match matched ws tmp1 tmp2 tmp3 local opts subc prefix suffix diff --git a/Completion/User/_use_lo b/Completion/User/_use_lo index 5f2210997..7386df6da 100644 --- a/Completion/User/_use_lo +++ b/Completion/User/_use_lo @@ -3,4 +3,4 @@ # This is for GNU-like commands which understand the --help option, # but which do not otherwise require special completion handling. -_arguments || _default +_arguments -- || _default -- cgit 1.4.1