about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-07-10 08:10:24 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-07-10 08:10:24 +0000
commite988866bda1996101ff8792ad959352d516e9e95 (patch)
treee38db2d822dbbf91789ee56dc253984f1fd758e8
parent7060b34457f579864bddbe1caa3e3cdfea6981e2 (diff)
downloadzsh-e988866bda1996101ff8792ad959352d516e9e95.tar.gz
zsh-e988866bda1996101ff8792ad959352d516e9e95.tar.xz
zsh-e988866bda1996101ff8792ad959352d516e9e95.zip
remove not only numeric suffixes, but also `.n' and the like (15352)
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_man5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 446337b8f..3a6a01b63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
 	* 15334: Src/builtin.c, Test/A01grammar.ztst, Test/A02alias.ztst,
diff --git a/Completion/Unix/Command/_man b/Completion/Unix/Command/_man
index 24bcf7d38..0bdd8db8b 100644
--- a/Completion/Unix/Command/_man
+++ b/Completion/Unix/Command/_man
@@ -47,8 +47,7 @@ _man_pages() {
 
   pages=( $dirs )
   compfiles -p pages '' '' "$matcher" '' dummy '*'
-
-  pages=( $~pages(:t:r) )
+  pages=( ${^~pages}(N:t:r) )
 
   (($#mrd)) && pages[$#pages+1]=($(awk $awk $mrd))
 
@@ -56,7 +55,7 @@ _man_pages() {
   # beginning with .<->: that handles problem cases like files called
   # `POSIX.1.5'.
 
-  compadd "$@" - ${pages%.<->*}
+  compadd "$@" - ${pages%.(?|<->*)}
 }
 
 _man "$@"