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

PATCH: couple more completion changes



Here's a couple more completion updates which I managed to miss out last
week: _ls and _mozilla. Just brings things up-to-date with the latest
versions.

Oliver

Index: Completion/Unix/Command/_ls
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ls,v
retrieving revision 1.5
diff -u -r1.5 _ls
--- Completion/Unix/Command/_ls	25 Apr 2003 11:19:08 -0000	1.5
+++ Completion/Unix/Command/_ls	21 Nov 2003 20:19:38 -0000
@@ -6,10 +6,13 @@
 arguments=(
   '(--all -a -A --almost-all)'{--all,-a}'[list entries starting with .]'
   '(--almost-all -A -a --all)'{--almost-all,-A}'[list all except . and ..]'
+  '--author[print the author of each file]'
   '(--ignore-backups -B)'{--ignore-backups,-B}"[don't list entries ending with ~]"
   '(--directory -d)'{--directory,-d}'[list directory entries instead of contents]'
+  '(--dired -D)'{--dired,-D}"[generate output designed for Emacs' dired mode]"
   '(--ignore,-I)'{--ignore,-I}"[don't list entire matching pattern]:pattern:"
-  '(--dereference -L)'{--dereference,-L}'[list referenced file for sym link]'
+  '(--dereference -L --dereference-command-line --dereference-command-line-symlink-to-dir)'{--dereference,-L}'[list referenced file for sym link]'
+  '(--dereference -L --dereference-command-line --dereference-command-line-symlink-to-dir)'{--dereference-command-line,--dereference-command-line-symlink-to-dir}
   '(--recursive -R)'{--recursive,-R}'[list subdirectories recursively]'
  
   '(--no-group -G)'{--no-group,-G}'[inhibit display of group information]'
@@ -17,19 +20,21 @@
   '(--si -H -h --human-readable)'{--si,-H}'[sizes in human readable form; powers of 1000]'
   '(--inode -i)'{--inode,-i}'[print file inode numbers]'
  
-  '(--format -o -1 -C -m -x)-l[long listing]'
+  '(--format -l -g -o -1 -C -m -x)-l[long listing]'
+  '(--format -l -1 -C -m -x)-g[long listing but without owner information]' 
   '(--format -l --no-group -G -1 -C -m -x)-o[no group, long]'
-  '(--format -l -o -C -m -x)-1[single column output]'
-  '(--format -l -o -1 -m -x)-C[sort vertically]'
-  '(--format -l -o -1 -C -x)-m[comma separated]'
-  '(--format -l -o -1 -C -m)-x[sort horizontally]'
-  '(-l -o -1 -C -m -x)--format=:format:(verbose long commas horizontal across vertical single-column)'
+  '(--format -l -g -o -C -m -x)-1[single column output]'
+  '(--format -l -g -o -1 -m -x)-C[list entries in columns sorted vertically]'
+  '(--format -l -g -o -1 -C -x)-m[comma separated]'
+  '(--format -l -g -o -1 -C -m)-x[sort horizontally]'
+  '(-l -g -o -1 -C -m -x)--format=:format:(verbose long commas horizontal across vertical single-column)'
  
   '(--size -s -f)'{--size,-s}'[display size of each file in blocks]'
  
   '(--time -u)-c[status change time]'
   '(--time -c)-u[access time]'
   '(-c -u)--time=[specify time to show]:time:(ctime status use atime access)'
+  '--time-style=[show times using specified style]:time style:(full-iso long-iso iso locale)'
  
   '(-a --all -U -l --format -s --size -t --sort --full-time)-f[unsorted, all, short list]'
   '(--reverse)'{--reverse,-r}'[reverse sort order]'
@@ -63,7 +68,8 @@
  
   '(--hide-control-chars -q --show-control-chars)'{--hide-control-chars,-q}'[hide control chars]'
   '(-q --hide-control-chars)--show-control-chars'
-  '--version[display version information]'
+  '(- :)--help[display help information]'
+  '(- :)--version[display version information]'
   '*:files:_files'
 )
 
Index: Completion/X/Command/_mozilla
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/X/Command/_mozilla,v
retrieving revision 1.2
diff -u -r1.2 _mozilla
--- Completion/X/Command/_mozilla	17 Jan 2003 09:23:35 -0000	1.2
+++ Completion/X/Command/_mozilla	21 Nov 2003 20:19:38 -0000
@@ -1,35 +1,39 @@
-#compdef mozilla
+#compdef mozilla mozilla-firebird mozilla-xremote-client
 
 local curcontext="$curcontext" state line ret=1 suf
 typeset -A opt_args
 
-_x_arguments -C \
-  '-height[height of startup window]:height:' \
-  '(-h)-help[show usage message]' \
-  '(-help)-h[show usage message]' \
-  '-installer[start with 4.x migration window]' \
-  '-width[width of startup window]:width:' \
-  '(-v)-version[show the version number and build date]' \
-  '(-version)-v[show the version number and build date]' \
-  '-CreateProfile:profile:' \
-  '-P[start with profile]:profile:' \
-  '-ProfileWizard[start with profile wizard]' \
-  '-ProfileManager[start with profile manager]' \
-  '-SelectProfile[start with profile selection dialog]' \
-  '-UILocale:locale:' \
-  '-contentLocale:locale:' \
-  '-remote[execute a command in an existing Mozilla]:remote command:->remote' \
-  '-splash[enable splash screen]' \
-  '-chat[start with IRC client]' \
-  '-news[start with news]' \
-  '-jsconsole[start with JavaScript Console]' \
-  '-venkman[start with JavaScript debugger]' \
-  '-terminal[start with command line terminal]' \
-  '-edit[start with editor]:url:_urls' \
-  '-chrome[load the specified chrome]:url:_urls' \
-  '-mail[start with mail]' \
-  '-compose[start with messenger compose]:url:_urls' \
-  '*:location:->urls' && ret=0
+local popts="-installer -CreateProfile -P -ProfileWizard -ProfileManager -SelectProfile"
+
+if [[ $service = *remote* ]]; then
+  state=remote
+else
+  _x_arguments -C \
+    '-height[height of startup window]:height' \
+    '(-)'{-h,-help}'[show usage message]' \
+    "($popts)-installer[start with 4.x migration window]" \
+    '-width[width of startup window]:width' \
+    '(-)'{-v,-version}'[show the version number and build date]' \
+    "($popts)-CreateProfile:profile" \
+    "($popts)-P[start with profile]:profile:compadd ~/.mozilla/*/*.slt(\:h\:t)" \
+    "($popts)-ProfileWizard[start with profile wizard]" \
+    "($popts)-ProfileManager[start with profile manager]" \
+    "($popts)-SelectProfile[start with profile selection dialog]" \
+    '-UILocale:locale' \
+    '-contentLocale:locale' \
+    '-remote[execute a command in an existing Mozilla]:remote command:->remote' \
+    '-splash[enable splash screen]' \
+    '-chat[start with IRC client]' \
+    '-news[start with news]' \
+    '-jsconsole[start with JavaScript Console]' \
+    '-venkman[start with JavaScript debugger]' \
+    '-terminal[start with command line terminal]' \
+    '-edit[start with editor]:url:_urls' \
+    '-chrome[load the specified chrome]:url:_urls' \
+    '-mail[start with mail]' \
+    '-compose[start with messenger compose]:url:_urls' \
+    '*:location:->urls' && ret=0
+fi
 
 [[ "$state" = "urls" ]] &&
   _files "$@" && return 0
@@ -37,7 +41,7 @@
 # Handle mozilla remote commands
 if [[ "$state" = "remote" ]]; then  
   local -a remote_commands
-  remote_commands=(openURL openFile saveAs mailto addBookmark)
+  remote_commands=(openURL openFile saveAs mailto addBookmark ping)
 
   compset -P '*\('
   if compset -S '(|\\)\)*'; then
@@ -46,7 +50,15 @@
     set - -S"${${QIPREFIX:+)}:-\)}$compstate[quote] " "$@"
   fi
   case $IPREFIX in
-    openURL*|addBookmark*) state=urls;;
+    openURL*)
+      if compset -P "*,"; then
+        _wanted option expl 'option' compadd "$@" new-tab new-window && ret=0
+      else
+        compset -S ',*'
+        state=urls
+      fi
+    ;;
+    addBookmark*) state=urls;;
     openFile*) _files "$@" -W ~;;
     saveAs*) 
       if compset -P "*,"; then



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