mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 00:20:05 -07:00
kiss: Simplify listing of extensions
This commit is contained in:
parent
368484b24a
commit
e9fbcc6f13
11
kiss
11
kiss
@ -1471,16 +1471,17 @@ args() {
|
||||
|
||||
log "Installed extensions (kiss-* in \$PATH)"
|
||||
|
||||
set --
|
||||
# shellcheck disable=2046
|
||||
# see [1] at top of script.
|
||||
set -- $(KISS_PATH=$PATH pkg_find kiss-\* all -x)
|
||||
|
||||
for path in $(KISS_PATH=$PATH pkg_find kiss-\* all -x); do
|
||||
[ -x "$path" ] && set -- "${path#*/kiss-}" "$@"
|
||||
max=$((${#1} > max ? ${#1} : max))
|
||||
for path do
|
||||
p=${path#*/kiss-} max=$((${#p} > max ? ${#p}+1 : max))
|
||||
done
|
||||
|
||||
for path do
|
||||
printf "%b->%b %-${max}s " "$lcol" "$lclr" "${path#*/kiss-}"
|
||||
sed -n 's/^# *//;2p' "$(command -v "kiss-$path")"
|
||||
sed -n 's/^# *//;2p' "$path"
|
||||
done | sort -uk1 >&2
|
||||
;;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user