diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-05-16 00:51:04 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-05-16 00:51:04 +0000 |
commit | 16ef2a726646ba444e4c876078bd77d81c095298 (patch) | |
tree | 080066dd0105d647f03e14adf4fe9e1ffcbf6a78 /Completion/User | |
parent | c5f1b07510e54d19f3088bfd1a829b92d2b7a35d (diff) | |
download | zsh-16ef2a726646ba444e4c876078bd77d81c095298.tar.gz zsh-16ef2a726646ba444e4c876078bd77d81c095298.tar.xz zsh-16ef2a726646ba444e4c876078bd77d81c095298.zip |
11396: Completion/User/_look: display a message when
an argument is empty.
Diffstat (limited to 'Completion/User')
-rw-r--r-- | Completion/User/_look | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Completion/User/_look b/Completion/User/_look index ea53867ee..e6c77a45e 100644 --- a/Completion/User/_look +++ b/Completion/User/_look @@ -8,11 +8,14 @@ _arguments -C -s \ '-f[case insensitive]' \ '-d[dictionary order]' \ ':string:->string' \ - ':dictionary file:_files -f' && return 0 + ':dictionary file:_files' && return 0 case "$state" in string) - [[ -n "$PREFIX" ]] && - _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX) + if [[ -n "$PREFIX" ]]; then + _wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX) + else + _message 'word prefix' + fi ;; esac |