We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 623fce4 commit d989d9cCopy full SHA for d989d9c
bin/cppsm
@@ -4,16 +4,24 @@
4
. "${BASH_SOURCE%/*/*}/commands/.settings"
5
6
COMMAND="$CPPSM/commands/$1"
7
-shift
8
9
-if [ ! -x "$COMMAND" ]; then
+if [ $# = 0 ] || [ ! -x "$COMMAND" ]; then
10
# shellcheck disable=SC2035
11
COMMANDS="$(cd "$CPPSM/commands" && echo *)"
12
COMMANDS="${COMMANDS// /|}"
13
cat << EOF
14
Usage: ${0##*/} [$COMMANDS]
+
15
+Run any command with --help to see a brief description of the command.
16
17
+Visit https://cppsm.github.io/ for full documentation.
18
19
+Branch: $(git -C "$CPPSM" symbolic-ref --short HEAD)
20
+$(git -C "$CPPSM" log -n 5 --pretty=oneline --abbrev-commit | sed 's#^# #g')
21
22
EOF
23
exit 1
24
fi
25
26
+shift
27
"$COMMAND" "$@"
0 commit comments