summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rwxr-xr-xCompletion/Unix/Type/_mime_types6
-rwxr-xr-xCompletion/X/Command/_kfmclient23
3 files changed, 24 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index d3493d1bf..8938233b0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-28 Peter Stephenson <pws@csr.com>
+
+ * 20200: Completion/Unix/Command/_kfmclient,
+ Completion/Unix/Type/_mime_types: fix some points made by Oliver
+ to tidy up. Also unposted: don't let _kfmclient drop through
+ to `no more arguments' on failed completion.
+
2004-07-26 Peter Stephenson <pws@csr.com>
* 20199: Completion/Unix/Command/_elinks,
diff --git a/Completion/Unix/Type/_mime_types b/Completion/Unix/Type/_mime_types
index 1a967501c..b8ed889b8 100755
--- a/Completion/Unix/Type/_mime_types
+++ b/Completion/Unix/Type/_mime_types
@@ -8,7 +8,7 @@ default_type_files=(~/.mime.types /etc/mime.types)
# This is the same style as used by zsh-mime-setup, with a different
# context.
-if zstyle -a ":completion:${curcontext}:mime" mime-types type_files; then
+if zstyle -a ":completion:${curcontext}:" mime-types type_files; then
while (( (ind = ${type_files[(I)+]}) > 0 )); do
type_files[$ind]=($default_type_files)
done
@@ -31,12 +31,12 @@ if [[ $PREFIX = (#b)([^/]##)/* ]]; then
# Search for subtype.
maintype=$match[1]
compset -p $(( ${#maintype} + 1 ))
- _wanted mimesubtype expl 'MIME subtype' \
+ _wanted mime-subtypes expl 'MIME subtype' \
compadd -- $(sed -ne "s%^\(type=\|\)${maintype}/\([^ ]*\).*$%\2%p" \
$type_files)
else
# Search for main type.
- _wanted mimetype expl 'MIME type' \
+ _wanted mime-types expl 'MIME type' \
compadd -S/ -- $(sed -ne "s/^type=//" \
-e "s%^\(${PREFIX:-[a-z]}[^=\"]*\)/.*$%\1%p" $type_files)
fi
diff --git a/Completion/X/Command/_kfmclient b/Completion/X/Command/_kfmclient
index f83e51779..5c45e9181 100755
--- a/Completion/X/Command/_kfmclient
+++ b/Completion/X/Command/_kfmclient
@@ -54,38 +54,43 @@ download copy sortDesktop configure configureDesktop)' \
# Argument to previous command.
-print $line >/tmp/tmp.out
-
case $line[1] in
(openURL)
if [[ $state = secondarg ]]; then
- _mime_types && return 0
+ _mime_types
+ return
elif [[ $state = firstarg ]]; then
- _urls && return 0
+ _urls
+ return
fi
;;
(openProfile)
if [[ $state = secondarg ]]; then
- _urls && return 0
+ _urls
+ return
elif [[ $state = firstarg ]]; then
_wanted profile expl 'Konqueror profile' \
- compadd -- ~/.kde/share/apps/konqueror/profiles/*(:t) && return 0
+ compadd -- ~/.kde/share/apps/konqueror/profiles/*(:t)
+ return
fi
;;
(exec)
if [[ $state = secondarg ]]; then
# TODO: could probe inside Desktop files.
- _message "KDE binding" && return 0
+ _message "KDE binding"
+ return
elif [[ $state = firstarg ]]; then
- _urls && return 0
+ _urls
+ return
fi
;;
(move|download|openProperties)
if [[ $state = firstarg ]]; then
- _urls && return 0
+ _urls
+ return
fi
;;
esac