diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-28 09:18:29 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-28 09:18:29 +0000 |
commit | 804599a7ce1ceedfebfcaf61a2287695dd922748 (patch) | |
tree | 76e486adf76f0e7ce24b8019f84cdde4413355d7 /Completion | |
parent | 8c9a6b01d1bf727d27bc12d7e63fbb34fa157587 (diff) | |
download | zsh-804599a7ce1ceedfebfcaf61a2287695dd922748.tar.gz zsh-804599a7ce1ceedfebfcaf61a2287695dd922748.tar.xz zsh-804599a7ce1ceedfebfcaf61a2287695dd922748.zip |
20200 plus unposted: fix MIME stuff,
don't let _kfmclient drop through to `no more arguments' unnecessarily
Diffstat (limited to 'Completion')
-rwxr-xr-x | Completion/Unix/Type/_mime_types | 6 | ||||
-rwxr-xr-x | Completion/X/Command/_kfmclient | 23 |
2 files changed, 17 insertions, 12 deletions
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 |