about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-09-07 08:39:20 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-09-07 08:39:20 +0000
commit0fe98894a8a40b0021d7863be9f47df91ad1e28f (patch)
tree9a6061fd635b39a529f59b7fd9c0707c4d896f4c
parentcceb4703de6973b51bfc7404f00ac9c026d415aa (diff)
downloadzsh-0fe98894a8a40b0021d7863be9f47df91ad1e28f.tar.gz
zsh-0fe98894a8a40b0021d7863be9f47df91ad1e28f.tar.xz
zsh-0fe98894a8a40b0021d7863be9f47df91ad1e28f.zip
stick some `N's into glob patterns (12768)
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Bsd/_bsd_pkg8
-rw-r--r--Completion/Bsd/_kld2
-rw-r--r--Completion/User/_gcc10
-rw-r--r--Completion/User/_gdb6
-rw-r--r--Completion/User/_mailboxes8
-rw-r--r--Completion/User/_zdump4
7 files changed, 26 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 513f7490f..541b05fde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-09-07  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12768: as suggested by Andrej (12767): Completion/Bsd/_bsd_pkg,
+	Completion/Bsd/_kld, Completion/User/_gcc, Completion/User/_gdb,
+ 	Completion/User/_mailboxes, Completion/User/_zdump: stick some
+ 	`N's into glob patterns
+	
 2000-09-06  Bart Schaefer  <schaefer@zsh.org>
 
 	* 12765,12766: Doc/Zsh/builtins.yo, Doc/Zsh/contrib.yo: Eliminate
diff --git a/Completion/Bsd/_bsd_pkg b/Completion/Bsd/_bsd_pkg
index f302f8216..6ab057dfc 100644
--- a/Completion/Bsd/_bsd_pkg
+++ b/Completion/Bsd/_bsd_pkg
@@ -7,7 +7,7 @@ _bsd_pkg_packages() {
   paths=( "${(@)${(@s.:.)PKG_PATH}:#}" )
   _files "$@" -g \*.tgz && ret=0
   (( $#path )) && _files "$@" -W paths -g \*.tgz && ret=0
-  compadd "$@" - /usr/ports/packages/All/*.tgz && ret=0
+  compadd "$@" - /usr/ports/packages/All/*.tgz(N) && ret=0
 
   return ret
 }
@@ -37,7 +37,7 @@ _bsd_pkg() {
 	'-d[remove empty directories]' \
 	'-f[force deinstallation]' \
         '-p:prefix directory:_files -/' \
-        '*:package to deinstall:compadd - /var/db/pkg/*(\:t)'
+        '*:package to deinstall:compadd - /var/db/pkg/*(N\:t)'
     ;;
 
   pkg_info)
@@ -57,10 +57,10 @@ _bsd_pkg() {
 	'-R[show list list of installed requiring packages]' \
 	'-m[show mtree files]' \
 	'-L[show full pathnames of files]' \
-        '-e[test if package is installed]:package name:compadd - /var/db/pkg/*(\:t)' \
+        '-e[test if package is installed]:package name:compadd - /var/db/pkg/*(N\:t)' \
         '-l:prefix directory:_files -/' \
         '-t:mktemp template:_files -/' \
-        '(-a)*:package name:compadd - /var/db/pkg/*(\:t)'
+        '(-a)*:package name:compadd - /var/db/pkg/*(N\:t)'
     ;;
   esac
 }
diff --git a/Completion/Bsd/_kld b/Completion/Bsd/_kld
index 8fc719ccb..ccecc2a0f 100644
--- a/Completion/Bsd/_kld
+++ b/Completion/Bsd/_kld
@@ -4,7 +4,7 @@
 _kld_module() {
   local ret=1
 
-  compadd "$@" - /boot/kernel/*.ko(:t) /modules/*.ko(:t) && ret=0
+  compadd "$@" - /boot/kernel/*.ko(N:t) /modules/*.ko(N:t) && ret=0
   _files "$@" -g \*.ko && ret=0
 
   return ret
diff --git a/Completion/User/_gcc b/Completion/User/_gcc
index bf92efdc2..92fff6a3d 100644
--- a/Completion/User/_gcc
+++ b/Completion/User/_gcc
@@ -1,7 +1,7 @@
 #compdef gcc
 
-local state line ret=1 expl args
-typeset -A options
+local curcontext="$curcontext" state line ret=1 expl args
+typeset -A opt_args
 
 args=()
 case $MACHTYPE in
@@ -163,7 +163,7 @@ h8/300)
 esac
 
 
-_arguments -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \
+_arguments -C -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \
   "$args[@]" \
   -c -S -E -v -a -w -C -H -P -s '(-pg)-p' '(-p)-pg' \
   '-o:output file:_files' \
@@ -273,8 +273,8 @@ dump)
     'p[annotate assembler output]' && ret=0
   ;;
 library)
-  _description expl library
-  compadd "$expl[@]" - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) && ret=0
+  _wanted libraries expl library \
+      compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(N:t:fr:s/lib//) && ret=0
   ;;
 esac
 
diff --git a/Completion/User/_gdb b/Completion/User/_gdb
index 0445e18e9..e1cca537f 100644
--- a/Completion/User/_gdb
+++ b/Completion/User/_gdb
@@ -4,13 +4,13 @@ local cur="$words[CURRENT]" prev w list ret=1 expl
 
 [[ "$PREFIX" = --* ]] &&
     _arguments -- '*=(CORE|SYM)FILE:core file:_files' \
-		  '*=EXECFILE:executable:_files \*\(-\*\)' \
-		  '*=TTY:terminal device:compadd /dev/tty\*' && return 0
+		  '*=EXECFILE:executable:_files -g \*\(-\*\)' \
+		  '*=TTY:terminal device:compadd /dev/tty\*\(N\)' && return 0
 
 if compset -P '-(cd|directory)='; then
   _files -/
 elif compset -P '-tty='; then
-  _wanted devices expl 'terminal device' compadd - /dev/tty*
+  _wanted devices expl 'terminal device' compadd - /dev/tty*(N)
 elif compset -P '-(exec|se)='; then
   _description files expl executable
   _files "$expl[@]" -g '*(-*)'
diff --git a/Completion/User/_mailboxes b/Completion/User/_mailboxes
index 40b21e89f..1f44ba7af 100644
--- a/Completion/User/_mailboxes
+++ b/Completion/User/_mailboxes
@@ -74,10 +74,10 @@ _mailbox_cache () {
     _mutt_cache=( ${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} )
 
 
-  _mbox_cache=( ${~maildirectory}/*(^/) )
-  _pine_cache=( ${~pinedirectory}/**/*(.) )
+  _mbox_cache=( ${~maildirectory}/*(N^/) )
+  _pine_cache=( ${~pinedirectory}/**/*(N.) )
 
-  dirboxes=( ${~maildirectory}/*(/) )
+  dirboxes=( ${~maildirectory}/*(N/) )
 
   while (( $#dirboxes )); do
     i=${dirboxes[1]}
@@ -87,7 +87,7 @@ _mailbox_cache () {
     elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then
       _mh_cache=( "${_mh_cache[@]}" "$i" )
     else
-      _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) )
+      _mbox_cache=( "${_mbox_cache[@]}" "$i"/*(N.) )
       dirboxes=( $dirboxes "$i"/*(/) )
     fi
   done
diff --git a/Completion/User/_zdump b/Completion/User/_zdump
index 2f9a010c1..598363ef5 100644
--- a/Completion/User/_zdump
+++ b/Completion/User/_zdump
@@ -1,9 +1,9 @@
 #compdef zdump
 
 if (( ! $+_zoneinfo_dirs )); then
-  _zoneinfo_dirs=(/usr/share/zoneinfo*(/) /usr/lib/zoneinfo*(/) /usr/share/lib/zoneinfo*(/))
+  _zoneinfo_dirs=( /usr/{share,lib,share/lib}/zoneinfo*(N/) )
 fi
 
 _arguments '-v[lowest possible]' \
            '-c[cutoff]:cutoff year:' \
-           '*:timezone:_path_files -W $_zoneinfo_dirs'
+           '*:timezone:_files -W _zoneinfo_dirs'