diff options
Diffstat (limited to 'Completion/Base/Utility/_arguments')
-rw-r--r-- | Completion/Base/Utility/_arguments | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments index d2c0d33de..136dd5826 100644 --- a/Completion/Base/Utility/_arguments +++ b/Completion/Base/Utility/_arguments @@ -43,7 +43,7 @@ if (( long )); then name="${name//[^a-zA-Z0-9_]/_}" if (( ! ${(P)+name} )); then - local iopts sopts pattern tmpo dir cur cache + local iopts sopts lflag pattern tmpo dir cur cache typeset -Ua lopts cache=() @@ -55,7 +55,12 @@ if (( long )); then iopts=() sopts=() - while [[ "$1" = -[is]* ]]; do + while [[ "$1" = -[lis]* ]]; do + if [[ "$1" = -l ]]; then + lflag='-l' + shift + continue + fi if [[ "$1" = -??* ]]; then tmp="${1[3,-1]}" cur=1 @@ -88,7 +93,8 @@ if (( long )); then # option up to the end. tmp=() - _call_program options ${~words[1]} --help 2>&1 | while IFS= read -r opt; do + _call_program $lflag options ${~words[1]} --help 2>&1 | + while IFS= read -r opt; do if (( ${#tmp} )); then # Previous line had no comment. Is the current one suitable? # It's hard to be sure, but if it there was nothing on the |