From: Alejandro Colomar Date: Thu, 21 Jul 2022 23:44:05 +0000 (+0200) Subject: bash_aliases: man_gitstaged(): Never show dirs X-Git-Tag: man-pages-6.0-rc1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfbd950c90a7f4df9a3dff8c8d011e692e8526ee;p=thirdparty%2Fman-pages.git bash_aliases: man_gitstaged(): Never show dirs 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 --- diff --git a/scripts/bash_aliases b/scripts/bash_aliases index 32d0138373..df79a952ee 100644 --- a/scripts/bash_aliases +++ b/scripts/bash_aliases @@ -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/, $//' } ########################################################################