about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-04-08 02:18:08 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-04-08 02:18:08 +0000
commit319df76ba9a568bec28a3d0869f73c8f896864e7 (patch)
treec96819b459a5ae798572d3a32221d1040c40217c /Completion/X
parent74ebc39b8445b5d5032883f9d13851155ab7c7e5 (diff)
downloadzsh-319df76ba9a568bec28a3d0869f73c8f896864e7.tar.gz
zsh-319df76ba9a568bec28a3d0869f73c8f896864e7.tar.xz
zsh-319df76ba9a568bec28a3d0869f73c8f896864e7.zip
Merge of trunk for workers/{20834,20932,21053,21294}.
Diffstat (limited to 'Completion/X')
-rwxr-xr-xCompletion/X/Command/_kfmclient102
1 files changed, 102 insertions, 0 deletions
diff --git a/Completion/X/Command/_kfmclient b/Completion/X/Command/_kfmclient
new file mode 100755
index 000000000..0d2b753b4
--- /dev/null
+++ b/Completion/X/Command/_kfmclient
@@ -0,0 +1,102 @@
+#compdef kfmclient
+
+# kfmclient is a command line interface for use with Konqueror,
+# the KDE file manager and web browser.
+
+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.
+
+case $line[1] in
+  (openURL)
+  if [[ $state = secondarg ]]; then
+    _mime_types
+    return
+  elif [[ $state = firstarg ]]; then
+    _webbrowser
+    return
+  fi
+  ;;
+
+  (openProfile)
+  if [[ $state = secondarg ]]; then
+    _webbrowser
+    return
+  elif [[ $state = firstarg ]]; then
+    local appdata=${$(kde-config --path data 2> /dev/null):-~/.kde/share/apps/}
+    _wanted profile expl 'Konqueror profile' \
+      compadd -- ${(s/:/)^${appdata}}konqueror/profiles/*(:t)
+    return
+  fi
+  ;;
+
+  (exec)
+  if [[ $state = secondarg ]]; then
+    # TODO: could probe inside Desktop files.
+    _message "KDE binding"
+    return
+  elif [[ $state = firstarg ]]; then
+    _webbrowser
+    return
+  fi
+  ;;
+
+  (move|download|copy|openProperties)
+  if [[ $state = firstarg ]]; then
+      _webbrowser
+      return
+  fi
+  ;;
+esac
+
+_message "no more arguments"