mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-12-25 08:30: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)"
|
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
|
for path do
|
||||||
[ -x "$path" ] && set -- "${path#*/kiss-}" "$@"
|
p=${path#*/kiss-} max=$((${#p} > max ? ${#p}+1 : max))
|
||||||
max=$((${#1} > max ? ${#1} : max))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for path do
|
for path do
|
||||||
printf "%b->%b %-${max}s " "$lcol" "$lclr" "${path#*/kiss-}"
|
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
|
done | sort -uk1 >&2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user