]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
bash_aliases: man_gitstaged(): Never show dirs
authorAlejandro Colomar <alx.manpages@gmail.com>
Thu, 21 Jul 2022 23:44:05 +0000 (01:44 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Thu, 21 Jul 2022 23:44:07 +0000 (01:44 +0200)
Directories are obvious also for scripts, or other non-man(7)
files.  Also, this adds support for man3type and man2type pages.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
scripts/bash_aliases

index 32d01383730c72e1b249017d05134fc1c80c66b8..df79a952ee1921553a1d3ea004e864fc9dcf764a 100644 (file)
@@ -198,10 +198,10 @@ pdfman()
 man_gitstaged()
 {
        git diff --staged --name-only                                   \
-       |sed "s/$/, /"                                                  \
-       |sed "s%man[0-9]/%%"                                            \
+       |sed 's/$/, /'                                                  \
+       |sed 's%.*/%%'                                                  \
        |tr -d '\n'                                                     \
-       |sed "s/, $//"
+       |sed 's/, $//'
 }
 
 ########################################################################