mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-19 03:31:14 +02:00
stick some `N's into glob patterns (12768)
This commit is contained in:
parent
cceb4703de
commit
0fe98894a8
7 changed files with 26 additions and 19 deletions
|
@ -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>
|
2000-09-06 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 12765,12766: Doc/Zsh/builtins.yo, Doc/Zsh/contrib.yo: Eliminate
|
* 12765,12766: Doc/Zsh/builtins.yo, Doc/Zsh/contrib.yo: Eliminate
|
||||||
|
|
|
@ -7,7 +7,7 @@ _bsd_pkg_packages() {
|
||||||
paths=( "${(@)${(@s.:.)PKG_PATH}:#}" )
|
paths=( "${(@)${(@s.:.)PKG_PATH}:#}" )
|
||||||
_files "$@" -g \*.tgz && ret=0
|
_files "$@" -g \*.tgz && ret=0
|
||||||
(( $#path )) && _files "$@" -W paths -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
|
return ret
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ _bsd_pkg() {
|
||||||
'-d[remove empty directories]' \
|
'-d[remove empty directories]' \
|
||||||
'-f[force deinstallation]' \
|
'-f[force deinstallation]' \
|
||||||
'-p:prefix directory:_files -/' \
|
'-p:prefix directory:_files -/' \
|
||||||
'*:package to deinstall:compadd - /var/db/pkg/*(\:t)'
|
'*:package to deinstall:compadd - /var/db/pkg/*(N\:t)'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
pkg_info)
|
pkg_info)
|
||||||
|
@ -57,10 +57,10 @@ _bsd_pkg() {
|
||||||
'-R[show list list of installed requiring packages]' \
|
'-R[show list list of installed requiring packages]' \
|
||||||
'-m[show mtree files]' \
|
'-m[show mtree files]' \
|
||||||
'-L[show full pathnames of 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 -/' \
|
'-l:prefix directory:_files -/' \
|
||||||
'-t:mktemp template:_files -/' \
|
'-t:mktemp template:_files -/' \
|
||||||
'(-a)*:package name:compadd - /var/db/pkg/*(\:t)'
|
'(-a)*:package name:compadd - /var/db/pkg/*(N\:t)'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
_kld_module() {
|
_kld_module() {
|
||||||
local ret=1
|
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
|
_files "$@" -g \*.ko && ret=0
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#compdef gcc
|
#compdef gcc
|
||||||
|
|
||||||
local state line ret=1 expl args
|
local curcontext="$curcontext" state line ret=1 expl args
|
||||||
typeset -A options
|
typeset -A opt_args
|
||||||
|
|
||||||
args=()
|
args=()
|
||||||
case $MACHTYPE in
|
case $MACHTYPE in
|
||||||
|
@ -163,7 +163,7 @@ h8/300)
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
_arguments -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \
|
_arguments -C -M 'L:|-{fW}no-=-{fW} r:|[_-]=* r:|=*' \
|
||||||
"$args[@]" \
|
"$args[@]" \
|
||||||
-c -S -E -v -a -w -C -H -P -s '(-pg)-p' '(-p)-pg' \
|
-c -S -E -v -a -w -C -H -P -s '(-pg)-p' '(-p)-pg' \
|
||||||
'-o:output file:_files' \
|
'-o:output file:_files' \
|
||||||
|
@ -273,8 +273,8 @@ dump)
|
||||||
'p[annotate assembler output]' && ret=0
|
'p[annotate assembler output]' && ret=0
|
||||||
;;
|
;;
|
||||||
library)
|
library)
|
||||||
_description expl library
|
_wanted libraries expl library \
|
||||||
compadd "$expl[@]" - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) && ret=0
|
compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(N:t:fr:s/lib//) && ret=0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@ local cur="$words[CURRENT]" prev w list ret=1 expl
|
||||||
|
|
||||||
[[ "$PREFIX" = --* ]] &&
|
[[ "$PREFIX" = --* ]] &&
|
||||||
_arguments -- '*=(CORE|SYM)FILE:core file:_files' \
|
_arguments -- '*=(CORE|SYM)FILE:core file:_files' \
|
||||||
'*=EXECFILE:executable:_files \*\(-\*\)' \
|
'*=EXECFILE:executable:_files -g \*\(-\*\)' \
|
||||||
'*=TTY:terminal device:compadd /dev/tty\*' && return 0
|
'*=TTY:terminal device:compadd /dev/tty\*\(N\)' && return 0
|
||||||
|
|
||||||
if compset -P '-(cd|directory)='; then
|
if compset -P '-(cd|directory)='; then
|
||||||
_files -/
|
_files -/
|
||||||
elif compset -P '-tty='; then
|
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
|
elif compset -P '-(exec|se)='; then
|
||||||
_description files expl executable
|
_description files expl executable
|
||||||
_files "$expl[@]" -g '*(-*)'
|
_files "$expl[@]" -g '*(-*)'
|
||||||
|
|
|
@ -74,10 +74,10 @@ _mailbox_cache () {
|
||||||
_mutt_cache=( ${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} )
|
_mutt_cache=( ${=${(M)${(f)"$(<${~muttrc})"}:#mailboxes *}#mailboxes *} )
|
||||||
|
|
||||||
|
|
||||||
_mbox_cache=( ${~maildirectory}/*(^/) )
|
_mbox_cache=( ${~maildirectory}/*(N^/) )
|
||||||
_pine_cache=( ${~pinedirectory}/**/*(.) )
|
_pine_cache=( ${~pinedirectory}/**/*(N.) )
|
||||||
|
|
||||||
dirboxes=( ${~maildirectory}/*(/) )
|
dirboxes=( ${~maildirectory}/*(N/) )
|
||||||
|
|
||||||
while (( $#dirboxes )); do
|
while (( $#dirboxes )); do
|
||||||
i=${dirboxes[1]}
|
i=${dirboxes[1]}
|
||||||
|
@ -87,7 +87,7 @@ _mailbox_cache () {
|
||||||
elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then
|
elif j=( "$i"/<1-> ) && [[ -n "$j" ]]; then
|
||||||
_mh_cache=( "${_mh_cache[@]}" "$i" )
|
_mh_cache=( "${_mh_cache[@]}" "$i" )
|
||||||
else
|
else
|
||||||
_mbox_cache=( "${_mbox_cache[@]}" "$i"/*(.) )
|
_mbox_cache=( "${_mbox_cache[@]}" "$i"/*(N.) )
|
||||||
dirboxes=( $dirboxes "$i"/*(/) )
|
dirboxes=( $dirboxes "$i"/*(/) )
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#compdef zdump
|
#compdef zdump
|
||||||
|
|
||||||
if (( ! $+_zoneinfo_dirs )); then
|
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
|
fi
|
||||||
|
|
||||||
_arguments '-v[lowest possible]' \
|
_arguments '-v[lowest possible]' \
|
||||||
'-c[cutoff]:cutoff year:' \
|
'-c[cutoff]:cutoff year:' \
|
||||||
'*:timezone:_path_files -W $_zoneinfo_dirs'
|
'*:timezone:_files -W _zoneinfo_dirs'
|
||||||
|
|
Loading…
Reference in a new issue