Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Cygwin completion functions



Here are completion functions for some of the cygwin commands.  This is a first
pass at generating the functions, so they still need work.

This includes a completion for mkzsh which which is suppose to create a
shortcut for zsh, so you can start zsh with an icon.   But there seems to be a
bug in the mkzsh script.  It would be nice if we could add the mkzsh function
to the zsh distribution so it would be easy to fix.

Here is a list of the completion functions being added:

_cygcheck    _cygrunsrv   _cygstart    _getclip     _mkshortcut  _pscp
_cygpath     _cygserver   _dumper      _getfacl     _mkzsh       _putclip

-FR.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
Index: Completion/Cygwin/Command/_cygcheck
===================================================================
RCS file: Completion/Cygwin/Command/_cygcheck
diff -N Completion/Cygwin/Command/_cygcheck
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_cygcheck	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,14 @@
+#compdef cygcheck cygcheck.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--check-setup --help -c -h)'{-c,--check-setup}'[check packages installed via setup.exe]' \
+  '(--keycheck --sysinfo -k -s)'{-s,--sysinfo}'[system information (not with -k)]' \
+  '(--verbose -v)'{-v,--verbose}'[verbose output (indented) (for -s or programs)]' \
+  '(--registry -r)'{-r,--registry}'[registry search (requires -s)]' \
+  '(--keycheck --sysinfo -k -s)'{-k,--keycheck}'[perform a keyboard check session (not with -s)]' \
+  '(--check-setup --help -c -h)'{-h,--help}'[give help about the info (not with -c)]' \
+  '(--version -V)'{-V,--version}'[output version information and exit]' \
+  '*:program: _command_names -e:*::program arguments: _normal'
Index: Completion/Cygwin/Command/_cygpath
===================================================================
RCS file: Completion/Cygwin/Command/_cygpath
diff -N Completion/Cygwin/Command/_cygpath
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_cygpath	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,33 @@
+#compdef cygpath cygpath.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--dos --mixed --type --unix --windows -d -m -t -u -w)'{-d,--dos}'[print DOS (short) form of NAME (C:\PROGRA~1\)]' \
+  '(--dos --mixed --type --unix --windows -d -m -t -u -w)'{-m,--mixed}'[like --windows, but with regular slashes (C:/WINNT)]' \
+  '(--dos --mixed --type --unix --windows -d -m -t -u -w)'{-u,--unix}'[(default) print Unix form of NAME (/cygdrive/c/winnt)]' \
+  '(--dos --mixed --type --unix --windows -d -m -t -u -w)'{-w,--windows}'[print Windows form of NAME (C:\WINNT)]' \
+  "(--dos --mixed --type --unix --windows -d -m -t -u -w)"{-t,--type}":print TYPE form\: 'dos', 'mixed', 'unix', or 'windows':(dos mixed unix windows)" \
+  '(--absolute --long-name --path --short-name -a -l -p -s)'{-a,--absolute}'[output absolute path]' \
+  '(--absolute --long-name --path --short-name -a -l -p -s)'{-l,--long-name}'[print Windows long form of NAME (with -w, -m only)]' \
+  "(--absolute --long-name --path --short-name -a -l -p -s)"{-p,--path}"[NAME is a PATH list (i.e., '/bin:/usr/bin')]" \
+  '(--absolute --long-name --path --short-name -a -l -p -s)'{-s,--short-name}'[print DOS (short) form of NAME (with -w, -m only)]' \
+  "(--allusers -A)"{-A,--allusers}"[use 'All Users' instead of current user for -D, -P]" \
+  "(--desktop --homeroot --smprograms --sysdir --windir -D -H -P -S -W)"{-D,--desktop}"[output 'Desktop' directory and exit]" \
+  "(--desktop --homeroot --smprograms --sysdir --windir -D -H -P -S -W)"{-H,--homeroot}"[output 'Profiles' directory (home root) and exit]" \
+  "(--desktop --homeroot --smprograms --sysdir --windir -D -H -P -S -W)"{-P,--smprograms}"[output Start Menu 'Programs' directory and exit]" \
+  '(--desktop --homeroot --smprograms --sysdir --windir -D -H -P -S -W)'{-S,--sysdir}'[output system directory and exit]' \
+  "(--desktop --homeroot --smprograms --sysdir --windir -D -H -P -S -W)"{-W,--windir}"[output 'Windows' directory and exit]" \
+  '(--file -f)'{-f,--file}':read FILE for input; use - to read from STDIN:_files' \
+  '(--option -o)'{-o,--option}'[read options from FILE as well (for use with --file)]' \
+  '(--close -c)'{-c,--close}':close HANDLE (for use in captured process):->HANDLE' \
+  '(--ignore -i)'{-i,--ignore}'[ignore missing argument]' \
+  '(--help -h)'{-h,--help}'[output usage information and exit]' \
+  '(--version -v)'{-v,--version}'[output version information and exit]' \
+  '1: :_files'  && return 0
+            
+case $state in
+  "HANDLE");;
+esac
+    
Index: Completion/Cygwin/Command/_cygrunsrv
===================================================================
RCS file: Completion/Cygwin/Command/_cygrunsrv
diff -N Completion/Cygwin/Command/_cygrunsrv
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_cygrunsrv	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,39 @@
+#compdef cygrunsrv cygrunsrv.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--install -I)'{-I,--install}':Installes a new service named <svc_name>.:->svc_name' \
+  '(--remove -R)'{-R,--remove}':Removes a service named <svc_name>.:->svc_name' \
+  '(--start -S)'{-S,--start}':Starts a service named <svc_name>.:->svc_name' \
+  '(--stop -E)'{-E,--stop}':Stops a service named <svc_name>.:->svc_name' \
+  '(--path -p)'{-p,--path}':Application path which is run as a service.:->app_path' \
+  '(--args -a)'{-a,--args}':Optional string with command line options which is given to the service application on startup.:->args' \
+  '(--chdir -c)'{-c,--chdir}':Optional directory which will be used as working directory for the application.:_directories' \
+  '(--env -e)'{-e,--env}':Optional environment strings which are added to the environment when service is started. You can add up to 255 environment strings using:->VAR=VALUE' \
+  '(--disp -d)'{-d,--disp}':Optional string which contains the display name of the service. Defaults to service name.:->display_name' \
+  '(--desc -f)'{-f,--desc}':Optional string which contains the service description.:->description' \
+  "(--type -t)"{-t,--type}"[Optional start type of service. Defaults to 'auto'.]: :(auto manual)" \
+  '(--user -u)'{-u,--user}':Optional user name to start service as. Defaults to SYSTEM account.:_users' \
+  '(--passwd -w)'{-w,--passwd}':Optional password for user. Only needed if a user is given. If a user has an empty:->password' \
+  '(--termsig -s)'{-s,--termsig}':Optional signal to send to service application when service is stopped. <signal> can be a number or a signal name such as HUP, INT, QUIT, etc. Default is TERM.:_signals' \
+  '(--dep -y)'{-y,--dep}':Optional name of service that must be started:->svc_name2' \
+  '(--stdin -0)'{-0,--stdin}':Optional input file used for stdin redirection. Default is /dev/null.:_files' \
+  '(--stdout -1)'{-1,--stdout}':Optional output file used for stdout redirection. Default is /var/log/<svc_name>.log.:_files' \
+  '(--stderr -2)'{-2,--stderr}':Optional output file used for stderr redirection. Default is /var/log/<svc_name>.log.:_files' \
+  '(--shutdown -o)'{-o,--shutdown}'[Stop service application during system shutdown.]' \
+  '(--help -h)'{-h,--help}'[print this help, then exit.]' \
+  '(--version -v)'{-v,--version}'[print cygrunsrv program version number, then exit.]' \
+  '*: :_files'  && return 0
+            
+case $state in
+  "VAR=VALUE");;
+  "app_path");;
+  "args");;
+  "description");;
+  "display_name");;
+  "password");;
+  "svc_name");;
+  "svc_name2");;
+esac
Index: Completion/Cygwin/Command/_cygserver
===================================================================
RCS file: Completion/Cygwin/Command/_cygserver
diff -N Completion/Cygwin/Command/_cygserver
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_cygserver	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,13 @@
+#compdef cygserver cygserver.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--cleanup-threads -c)'{-c,--cleanup-threads}'[number of cleanup threads to use]' \
+  '(--help -h)'{-h,--help}'[output usage information and exit]' \
+  '(--request-threads -r)'{-r,--request-threads}'[number of request threads to use]' \
+  '(--shutdown -s)'{-s,--shutdown}'[shutdown the daemon]' \
+  '(--version -v)'{-v,--version}'[output version information and exit]' \
+  '*: :_files'
+            
Index: Completion/Cygwin/Command/_cygstart
===================================================================
RCS file: Completion/Cygwin/Command/_cygstart
diff -N Completion/Cygwin/Command/_cygstart
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_cygstart	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,30 @@
+#compdef cygstart cygstart.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--action -a)'{-a,--action=-}':Use specified action instead of default:(open edit explore print find)' \
+  '(--open -o)'{-o,--open}'[Short for: --action open]' \
+  '(--explore -x)'{-x,--explore}'[Short for: --action explore]' \
+  '(--edit -e)'{-e,--edit}'[Short for: --action edit]' \
+  '(--find -f)'{-f,--find}'[Short for: --action find]' \
+  '(--print -p)'{-p,--print}'[Short for: --action print]' \
+  '(--directory -d)'{-d,--directory=-}':Set working directory:_directories' \
+  '--hide[Hides the window and activates another window]' \
+  '--maximize[Maximizes the specified window]' \
+  '--minimize[Minimizes the specified window and activates the next top-level window in the z-order]' \
+  '--restore[Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window]' \
+  '--show[Activates the window and displays it in its current size and position]' \
+  '--showmaximized[Activates the window and displays it as a maximized window]' \
+  '--showminimized[Activates the window and displays it as a minimized window]' \
+  '--showminnoactive[Displays the window as a minimized window. The active window remains active]' \
+  '--showna[Displays the window in its current state. The active window remains active]' \
+  '--shownoactivate[Displays a window in its most recent size and position. The active window remains active]' \
+  '--shownormal[Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time]' \
+  '(--help -?)'{'-?',--help}'[Show this help message]' \
+  '--usage[Display brief usage message]' \
+  '--version[Display version information]' \
+  '--license[Display licensing information]' \
+  '--reference[Open MSDN reference for ShellExecute]' \
+  '*:program: _command_names -e:*::program arguments: _normal'
Index: Completion/Cygwin/Command/_dumper
===================================================================
RCS file: Completion/Cygwin/Command/_dumper
diff -N Completion/Cygwin/Command/_dumper
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_dumper	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,13 @@
+#compdef dumper dumper.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments   \
+  '(--verbose -d)'{-d,--verbose}'[be verbose while dumping]' \
+  '(--help -h)'{-h,--help}'[output help information and exit]' \
+  '(--quiet -q)'{-q,--quiet}'[be quiet while dumping (default)]' \
+  '(--version -v)'{-v,--version}'[output version information and exit]' \
+  '1: :_file' \
+  '*: :_pids'
+            
Index: Completion/Cygwin/Command/_getclip
===================================================================
RCS file: Completion/Cygwin/Command/_getclip
diff -N Completion/Cygwin/Command/_getclip
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_getclip	7 Apr 2003 10:58:32 -0000
@@ -0,0 +1,13 @@
+#compdef getclip getclip.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments \
+  '(--dos -d)'{-d,--dos}'[Output text will have DOS line endings.]' \
+  '(--unix -u)'{-u,--unix}'[Output text will have UNIX line endings.]' \
+  '(--help -?)'{'-?',--help}'[Show this help message]' \
+  '--usage[Display brief usage message]' \
+  '--version[Display version information]' \
+  '--license[Display licensing information]'
+            
Index: Completion/Cygwin/Command/_getfacl
===================================================================
RCS file: Completion/Cygwin/Command/_getfacl
diff -N Completion/Cygwin/Command/_getfacl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_getfacl	7 Apr 2003 10:58:33 -0000
@@ -0,0 +1,12 @@
+#compdef getfacl getfacl.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--all -a)'{-a,--all}'[display the filename, the owner, the group, and the ACL of the file]' \
+  '(--dir -d)'{-d,--dir}'[display the filename, the owner, the group, and the default ACL of the directory, if it exists]' \
+  '(--help -h)'{-h,--help}'[output usage information and exit]' \
+  '(--noname -n)'{-n,--noname}'[display user and group IDs instead of names]' \
+  '(--version -v)'{-v,--version}'[output version information and exit]' \
+  '*: :_files'
Index: Completion/Cygwin/Command/_mkshortcut
===================================================================
RCS file: Completion/Cygwin/Command/_mkshortcut
diff -N Completion/Cygwin/Command/_mkshortcut
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_mkshortcut	7 Apr 2003 10:58:33 -0000
@@ -0,0 +1,24 @@
+#compdef mkshortcut mkshortcut.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '(--arguments -a)'{-a,--arguments=-}':Use arguments ARGS:->ARGS' \
+  '(--icon -i)'{-i,--icon=-}':icon file for link to use:_files' \
+  '(--iconoffset -j)'{-j,--iconoffset=-}':offset of icon in icon file (default is 0):->INT' \
+  '(--name -n)'{-n,--name=-}':name for link (defaults to TARGET):_files' \
+  "(--allusers -A)"{-A,--allusers}"[use 'All Users' instead of current user for -D,-P]" \
+  "(--desktop -D)"{-D,--desktop}"[create link relative to 'Desktop' directory]" \
+  "(--smprograms -P)"{-P,--smprograms}"[create link relative to Start Menu 'Programs' directory]" \
+  '(--help -h)'{-h,--help}'[Show this help message]' \
+  '--usage[Display brief usage message]' \
+  '(--version -v)'{-v,--version}'[Display version information]' \
+  '--license[Display licensing information]' \
+  '1:Target:_files'  && return 0
+            
+case $state in
+  "ARGS");;
+  "INT");;
+esac
+    
Index: Completion/Cygwin/Command/_mkzsh
===================================================================
RCS file: Completion/Cygwin/Command/_mkzsh
diff -N Completion/Cygwin/Command/_mkzsh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_mkzsh	7 Apr 2003 10:58:33 -0000
@@ -0,0 +1,10 @@
+#compdef mkzsh mkzsh.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments \
+  '(--allusers -A)'{-A,--allusers}'[creates item for All Users instead of just current user]' \
+  '(--desktop -D)'{-D,--desktop}'[creates a Desktop icon for running /zsh.bat]' \
+  '(--smprograms -P)'{-P,--smprograms}'[creates a Program menu item for running /zsh.bat]' \
+  '(--help -h)'{-h,--help}'[prints usage]'
Index: Completion/Cygwin/Command/_pscp
===================================================================
RCS file: Completion/Cygwin/Command/_pscp
diff -N Completion/Cygwin/Command/_pscp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_pscp	7 Apr 2003 10:58:33 -0000
@@ -0,0 +1,24 @@
+#compdef pscp pscp.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments  \
+  '-p[preserve file attributes]' \
+  "-q[quiet, don't show statistics]" \
+  '-r[copy directories recursively]' \
+  '-v[show verbose messages]' \
+  '-load:Load settings from saved session:->sessname' \
+  '-P:connect to specified port:_ports' \
+  '-l:connect with specified username:_users' \
+  '-pw[passw login with specified password]' \
+  '(-1 -2)'{-1,-2}'[force use of particular SSH protocol version]' \
+  '-C[enable compression]' \
+  '-i:private key file for authentication:_files' \
+  '-batch[disable all interactive prompts]' \
+  '-unsafe[allow server-side wildcards (DANGEROUS)]' \
+  '*: :_files'  && return 0
+            
+case $state in
+  "sessname");;
+esac
Index: Completion/Cygwin/Command/_putclip
===================================================================
RCS file: Completion/Cygwin/Command/_putclip
diff -N Completion/Cygwin/Command/_putclip
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Completion/Cygwin/Command/_putclip	7 Apr 2003 10:58:33 -0000
@@ -0,0 +1,12 @@
+#compdef putclip putclip.exe
+#Generated by Felix Rosencrantz
+
+local context state line
+typeset -A opt_args
+_arguments \
+  '(--dos -d)'{-d,--dos}'[Clipboard text will have DOS line endings.]' \
+  '(--unix -u)'{-u,--unix}'[Clipboard text will have UNIX line endings.]' \
+  '(--help -?)'{'-?',--help}'[Show this help message]' \
+  '--usage[Display brief usage message]' \
+  '--version[Display version information]' \
+  '--license[Display licensing information]'


Messages sorted by: Reverse Date, Date, Thread, Author