summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-05-16 00:51:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-05-16 00:51:04 +0000
commit16ef2a726646ba444e4c876078bd77d81c095298 (patch)
tree080066dd0105d647f03e14adf4fe9e1ffcbf6a78
parentc5f1b07510e54d19f3088bfd1a829b92d2b7a35d (diff)
downloadzsh-16ef2a726646ba444e4c876078bd77d81c095298.tar.gz
zsh-16ef2a726646ba444e4c876078bd77d81c095298.zip
11396: Completion/User/_look: display a message when
an argument is empty.
-rw-r--r--ChangeLog3
-rw-r--r--Completion/User/_look9
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1945cfd22..fbe2909b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2000-05-16 Tanaka Akira <akr@zsh.org>
+ * 11396: Completion/User/_look: display a message when
+ an argument is empty.
+
* 11394: Completion/User/_cvs: rewrite filename completion
functions.
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