diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-26 16:59:53 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-07-26 16:59:53 +0000 |
commit | 8c9a6b01d1bf727d27bc12d7e63fbb34fa157587 (patch) | |
tree | 3932e6e59f6b42c1b9be84c4b375c412c10a708a /Completion/X/Command | |
parent | 17e576782c4fd64194d4908af5b9774308f1205f (diff) | |
download | zsh-8c9a6b01d1bf727d27bc12d7e63fbb34fa157587.tar.gz zsh-8c9a6b01d1bf727d27bc12d7e63fbb34fa157587.tar.xz zsh-8c9a6b01d1bf727d27bc12d7e63fbb34fa157587.zip |
20199: improve MIME handling.
Diffstat (limited to 'Completion/X/Command')
-rw-r--r-- | Completion/X/Command/.distfiles | 1 | ||||
-rwxr-xr-x | Completion/X/Command/_kfmclient | 93 |
2 files changed, 94 insertions, 0 deletions
diff --git a/Completion/X/Command/.distfiles b/Completion/X/Command/.distfiles index 391411168..d188982b7 100644 --- a/Completion/X/Command/.distfiles +++ b/Completion/X/Command/.distfiles @@ -3,4 +3,5 @@ DISTFILES_SRC=' _gv _netscape _xauth _xfig _mozilla _xterm _xwit _nedit _vnc _x_utils _xdvi _xmodmap _xset _xv _acroread _dcop _gqview _xloadimage _mplayer +_kfmclient ' diff --git a/Completion/X/Command/_kfmclient b/Completion/X/Command/_kfmclient new file mode 100755 index 000000000..f83e51779 --- /dev/null +++ b/Completion/X/Command/_kfmclient @@ -0,0 +1,93 @@ +#compdef kfmclient + +local expl +local -a context state line +typeset -A opt_args + +_arguments \ + '--help[show help message]' \ + '--help-qt[show Qt specific options]' \ + '--help-kde[show KDE specific options]' \ + '--help-all[show all options]' \ + '--author[show author information]' \ + '-v[show version information]' \ + '--version[show version information]' \ + '--license[show license information]' \ + '--commands[show available commands]' \ + '--display=:X display:_x_display' \ + '--session=:session id for restoring application: ' \ + '--cmap[use private colormap (8-bit display)]' \ + '--ncols=:limit on number of colors (8-bit display): ' \ + '--nograb[never grab mouse or keyboard]' \ + '--dograb[override nograb in debugger]' \ + '--sync[switch to synchronous mode when debugging]' \ + '--fn=:font name:_x_font' \ + '--font=:font name:_x_font' \ + '--bg=:background color:_x_color' \ + '--background=:background color:_x_color' \ + '--fg=:foreground color:_x_color' \ + '--foreround=:foreground color:_x_color' \ + '--btn=:button color:_x_color' \ + '--button=:button color:_x_color' \ + '--name=:application name: ' \ + '--title=:application title (caption): ' \ + '--visual=:specify visual:_x_visual' \ + '--inputstyle:X input method:(onthespot overthespot offthespot root)' \ + '--im:X Input Method server: ' \ + '--noxim[disable X Input Method]' \ + '--reverse[reverse widget layout]' \ + '--caption=:name in titlebar: ' \ + '--icon=:application icon: ' \ + '--miniicon=:icon in titlebar: ' \ + '--config=:configuration file:_files' \ + '--dcopserver=:DCOP server: ' \ + '--nocrashhandler[disable crash handler, allow core dumps]' \ + '--waitforwm[Wait for a WM_NET compatible window manager]' \ + '--style=:GUI style for application: ' \ + '--geometry=:client window geometry:_x_geometry' \ + '1:client command:(openURL openProfile openProperties exec move +download copy sortDesktop configure configureDesktop)' \ + '2::args:->firstarg' \ + '3::args:->secondarg' && return 0 + +[[ $state = *arg ]] || return 1 + +# Argument to previous command. + +print $line >/tmp/tmp.out + +case $line[1] in + (openURL) + if [[ $state = secondarg ]]; then + _mime_types && return 0 + elif [[ $state = firstarg ]]; then + _urls && return 0 + fi + ;; + + (openProfile) + if [[ $state = secondarg ]]; then + _urls && return 0 + elif [[ $state = firstarg ]]; then + _wanted profile expl 'Konqueror profile' \ + compadd -- ~/.kde/share/apps/konqueror/profiles/*(:t) && return 0 + fi + ;; + + (exec) + if [[ $state = secondarg ]]; then + # TODO: could probe inside Desktop files. + _message "KDE binding" && return 0 + elif [[ $state = firstarg ]]; then + _urls && return 0 + fi + ;; + + (move|download|openProperties) + if [[ $state = firstarg ]]; then + _urls && return 0 + fi + ;; +esac + +_message "no more arguments" |