diff options
| author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-06 13:01:51 +0000 |
|---|---|---|
| committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-10-06 13:01:51 +0000 |
| commit | cb4bb129dd143255a582ddd203baa73d3dcc1db7 (patch) | |
| tree | 9edc79a76c65821dfabccdb6a13f7c6e6adbc7e9 | |
| parent | Other places where `unsetopt cshnullglob' is needed. (diff) | |
| download | zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar.gz zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar.bz2 zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar.lz zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar.xz zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.tar.zst zsh-cb4bb129dd143255a582ddd203baa73d3dcc1db7.zip | |
more option setting cleanup; remove some unnecessary setopts, remove N qualifiers (12917)
| -rw-r--r-- | ChangeLog | 12 | ||||
| -rw-r--r-- | Completion/Bsd/_bsd_pkg | 8 | ||||
| -rw-r--r-- | Completion/Bsd/_kld | 2 | ||||
| -rw-r--r-- | Completion/Builtins/_autoload | 2 | ||||
| -rw-r--r-- | Completion/Builtins/_cd | 2 | ||||
| -rw-r--r-- | Completion/Builtins/_compdef | 2 | ||||
| -rw-r--r-- | Completion/Builtins/_popd | 2 | ||||
| -rw-r--r-- | Completion/Core/_expand | 2 | ||||
| -rw-r--r-- | Completion/Core/_path_files | 5 | ||||
| -rw-r--r-- | Completion/Linux/_rpm | 2 | ||||
| -rw-r--r-- | Completion/User/_gcc | 2 | ||||
| -rw-r--r-- | Completion/User/_gdb | 4 | ||||
| -rw-r--r-- | Completion/User/_mailboxes | 10 | ||||
| -rw-r--r-- | Completion/User/_man | 8 | ||||
| -rw-r--r-- | Completion/User/_perl_modules | 7 | ||||
| -rw-r--r-- | Completion/User/_printers | 2 | ||||
| -rw-r--r-- | Completion/User/_zdump | 2 |
17 files changed, 39 insertions, 35 deletions
@@ -1,3 +1,15 @@ +2000-10-06 Sven Wischnowsky <wischnow@zsh.org> + + * 12917: Completion/Bsd/_bsd_pkg, Completion/Bsd/_kld, + Completion/Builtins/_autoload, Completion/Builtins/_cd, + Completion/Builtins/_compdef, Completion/Builtins/_popd, + Completion/Core/_expand, Completion/Core/_path_files, + Completion/Linux/_rpm, Completion/User/_gcc, Completion/User/_gdb, + Completion/User/_mailboxes, Completion/User/_man, + Completion/User/_perl_modules, Completion/User/_printers, + Completion/User/_zdump: more option setting cleanup; remove some + unnecessary setopts, remove N qualifiers + 2000-10-05 Bart Schaefer <schaefer@zsh.org> * 12912: Completion/Commands/_bash_completions, diff --git a/Completion/Bsd/_bsd_pkg b/Completion/Bsd/_bsd_pkg index 6ab057dfc..f302f8216 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(N) && ret=0 + compadd "$@" - /usr/ports/packages/All/*.tgz && 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/*(N\:t)' + '*:package to deinstall:compadd - /var/db/pkg/*(\: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/*(N\:t)' \ + '-e[test if package is installed]:package name:compadd - /var/db/pkg/*(\:t)' \ '-l:prefix directory:_files -/' \ '-t:mktemp template:_files -/' \ - '(-a)*:package name:compadd - /var/db/pkg/*(N\:t)' + '(-a)*:package name:compadd - /var/db/pkg/*(\:t)' ;; esac } diff --git a/Completion/Bsd/_kld b/Completion/Bsd/_kld index ccecc2a0f..8fc719ccb 100644 --- a/Completion/Bsd/_kld +++ b/Completion/Bsd/_kld @@ -4,7 +4,7 @@ _kld_module() { local ret=1 - compadd "$@" - /boot/kernel/*.ko(N:t) /modules/*.ko(N:t) && ret=0 + compadd "$@" - /boot/kernel/*.ko(:t) /modules/*.ko(:t) && ret=0 _files "$@" -g \*.ko && ret=0 return ret diff --git a/Completion/Builtins/_autoload b/Completion/Builtins/_autoload index 238b79e95..81ded019a 100644 --- a/Completion/Builtins/_autoload +++ b/Completion/Builtins/_autoload @@ -6,5 +6,5 @@ if (( $words[(I)[-+]*w*] )); then _description files expl 'zwc file' _files "$expl[@]" -g '*.zwc' else - _wanted functions expl 'shell function' compadd - ${^fpath}/*(N:t) + _wanted functions expl 'shell function' compadd - ${^fpath}/*(:t) fi diff --git a/Completion/Builtins/_cd b/Completion/Builtins/_cd index 3abe26049..05d5e6f88 100644 --- a/Completion/Builtins/_cd +++ b/Completion/Builtins/_cd @@ -19,7 +19,7 @@ if [[ CURRENT -eq 3 ]]; then # cd old new: look for old in $PWD and see what can replace it local rep # Get possible completions using word in position 2 - rep=(${~PWD/$words[2]/*}~$PWD(-/N)) + rep=(${~PWD/$words[2]/*}~$PWD(-/)) # Now remove all the common parts of $PWD and the completions from this rep=(${${rep#${PWD%%$words[2]*}}%${PWD#*$words[2]}}) (( $#rep )) && _wanted -C replacement strings expl replacement compadd -a rep diff --git a/Completion/Builtins/_compdef b/Completion/Builtins/_compdef index 636004af2..ab7c30e92 100644 --- a/Completion/Builtins/_compdef +++ b/Completion/Builtins/_compdef @@ -33,7 +33,7 @@ case $state in _wanted commands expl 'completed command' compadd -k _comps ;; cfun) - list=( ${^fpath:/.}/_(|*[^~])(N:t) ) + list=( ${^fpath:/.}/_(|*[^~])(:t) ) if zstyle -T ":completion:${curcontext}:functions" prefix-hidden; then disp=( ${list[@]#_} ) _wanted functions expl 'completion function' \ diff --git a/Completion/Builtins/_popd b/Completion/Builtins/_popd index ff9ede12e..f551bb299 100644 --- a/Completion/Builtins/_popd +++ b/Completion/Builtins/_popd @@ -5,7 +5,7 @@ # way round if pushdminus is set). Note that this function is also called # from _cd for cd and pushd. -setopt extendedglob nonomatch +setopt localoptions nonomatch local expl list lines revlines disp diff --git a/Completion/Core/_expand b/Completion/Core/_expand index d47251c5a..44dfa4789 100644 --- a/Completion/Core/_expand +++ b/Completion/Core/_expand @@ -7,7 +7,7 @@ # the expansions done produce no result or do not change the original # word from the line. -setopt localoptions nullglob nonomatch +setopt localoptions nonomatch [[ _matcher_num -gt 1 ]] && return 1 diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index b9f578860..256478515 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -10,9 +10,6 @@ local nm=$compstate[nmatches] menu matcher mopts sort match mid accex fake typeset -U prepaths exppaths -setopt localoptions nullglob rcexpandparam -unsetopt markdirs globsubst shwordsplit nounset - exppaths=() # Get the options. @@ -317,7 +314,7 @@ for prepath in "$prepaths[@]"; do # Force auto-mounting. There might be a better way... - : ${^tmp1}/${PREFIX}${SUFFIX}/.(N/) + : ${^tmp1}/${PREFIX}${SUFFIX}/.(/) # Get the matching files by globbing. diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm index 34bf30e73..69e4b612b 100644 --- a/Completion/Linux/_rpm +++ b/Completion/Linux/_rpm @@ -269,7 +269,7 @@ fi _rpms_caching_policy () { # rebuild if cache is more than a week old - oldp=( "$1"(Nmw+1) ) + oldp=( "$1"(mw+1) ) (( $#oldp )) && return 0 [[ /var/lib/rpm/packages.rpm -nt "$1" ]] diff --git a/Completion/User/_gcc b/Completion/User/_gcc index 92fff6a3d..f826f9793 100644 --- a/Completion/User/_gcc +++ b/Completion/User/_gcc @@ -274,7 +274,7 @@ dump) ;; library) _wanted libraries expl library \ - compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(N:t:fr:s/lib//) && ret=0 + compadd - ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) && ret=0 ;; esac diff --git a/Completion/User/_gdb b/Completion/User/_gdb index e1cca537f..f7dbb0a10 100644 --- a/Completion/User/_gdb +++ b/Completion/User/_gdb @@ -5,12 +5,12 @@ local cur="$words[CURRENT]" prev w list ret=1 expl [[ "$PREFIX" = --* ]] && |
