Skip to content

Commit a18db46

Browse files
rustdevbtwmxcl
authored andcommitted
Update bk
1 parent ef50bf2 commit a18db46

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/bk

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ if [ -z "$1" ] || [ "$1" = '--help' ] || [ "$1" = '-h' ]; then
77
echo " $0 <command> [args]" >&2
88
echo >&2
99
echo available commands: >&2
10-
for x in $(ls "$d"/cmd); do
11-
echo " $x" >&2
12-
done
10+
for x in $(ls "$d"); do
11+
if [[ "$x" =~ ^bk- ]]; then
12+
# Strip the prefix and print the remaining filename with tab padding
13+
echo " ${x:3}" >&2
14+
fi
1315
echo >&2
1416
echo • some commands provide \`--help\` >&2
1517
echo"you can (unambiguously) shorten commands, eg. \`bk b\`"

0 commit comments

Comments
 (0)