kiss: remove second last sed call

This commit is contained in:
Dylan Araps 2021-07-19 18:32:30 +03:00
parent 935196adaa
commit 6cbf35151b
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 10 additions and 2 deletions

12
kiss
View File

@ -1804,11 +1804,19 @@ args() {
esac
done
IFS=\#$IFS
# Print each extension, grab its description from the second line
# in the file and align the output based on the above max.
for path do
printf "%b->%b %-${max}s " "$c1" "$c3" "${path#*/kiss-}"
sed -n 's/^# *//;2p' "$path"
# Open the extension as a file descriptor.
exec 3< "$path"
# Grab the second line in the extension.
{ read -r _ && read -r _ cmt; } <&3
printf "%b->%b %-${max}s %s\\n" \
"$c1" "$c3" "${path#*/kiss-}" "$cmt"
done >&2
;;