1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-11 04:20:01 +01:00

remove not only numeric suffixes, but also `.n' and the like (15352)

This commit is contained in:
Sven Wischnowsky 2001-07-10 08:10:24 +00:00
parent 7060b34457
commit e988866bda
2 changed files with 7 additions and 3 deletions

@ -1,3 +1,8 @@
2001-07-10 Sven Wischnowsky <wischnow@zsh.org>
* 15352: Completion/Unix/Command/_man: remove not only numeric
suffixes, but also `.n' and the like
2001-07-09 Peter Stephenson <pws@csr.com> 2001-07-09 Peter Stephenson <pws@csr.com>
* 15334: Src/builtin.c, Test/A01grammar.ztst, Test/A02alias.ztst, * 15334: Src/builtin.c, Test/A01grammar.ztst, Test/A02alias.ztst,

@ -47,8 +47,7 @@ _man_pages() {
pages=( $dirs ) pages=( $dirs )
compfiles -p pages '' '' "$matcher" '' dummy '*' compfiles -p pages '' '' "$matcher" '' dummy '*'
pages=( ${^~pages}(N:t:r) )
pages=( $~pages(:t:r) )
(($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd)) (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd))
@ -56,7 +55,7 @@ _man_pages() {
# beginning with .<->: that handles problem cases like files called # beginning with .<->: that handles problem cases like files called
# `POSIX.1.5'. # `POSIX.1.5'.
compadd "$@" - ${pages%.<->*} compadd "$@" - ${pages%.(?|<->*)}
} }
_man "$@" _man "$@"