Skip to content

Commit cac0953

Browse files
committed
cmd/lima: support --help
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 05b57a1 commit cac0953

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmd/lima

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,18 @@
22
set -eu
33
: "${LIMA_INSTANCE:=default}"
44
: "${LIMACTL:=limactl}"
5+
6+
if [ "$#" -eq 1 ]; then
7+
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
8+
base="$(basename "$0")"
9+
echo "Usage: ${base} [COMMAND...]"
10+
echo
11+
echo "${base} is an alias for \"${LIMACTL} shell ${LIMA_INSTANCE}\"."
12+
echo "The instance name (\"${LIMA_INSTANCE}\") can be changed by specifying \$LIMA_INSTANCE."
13+
echo
14+
echo "See \`${LIMACTL} shell --help\` for further information."
15+
exit 0
16+
fi
17+
fi
18+
519
exec "$LIMACTL" shell "$LIMA_INSTANCE" "$@"

0 commit comments

Comments
 (0)