15 lines
495 B
Bash
15 lines
495 B
Bash
#!/bin/bash
|
|
# description: List all available tools with their descriptions and usage
|
|
set -euo pipefail
|
|
|
|
OLLIE="${OLLIE_9MOUNT:-$HOME/mnt/ollie}"
|
|
|
|
for f in "$OLLIE/t/"*; do
|
|
[ -f "$f" ] || continue
|
|
name=$(basename "$f")
|
|
desc=$(grep -m1 "^# description:" "$f" 2>/dev/null | sed 's/^# description: *//')
|
|
args=$(grep -m1 "^# [Aa]rgs:" "$f" 2>/dev/null | sed 's/^# [Aa]rgs: *//')
|
|
printf '%-28s %s\n' "$name" "$desc"
|
|
[ -n "$args" ] && printf '%-28s Args: %s\n' "" "$args"
|
|
done
|