diff options
Diffstat (limited to '')
-rw-r--r-- | .bashrc_cxx | 14 | ||||
-rw-r--r-- | .bashrc_pgn | 2 | ||||
-rw-r--r-- | .bashrc_third_party | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/.bashrc_cxx b/.bashrc_cxx index dc1eaf5..b3b5bee 100644 --- a/.bashrc_cxx +++ b/.bashrc_cxx @@ -13,11 +13,16 @@ runc() ( case "$1" in --c-flags) if [ "$#" -le 1 ]; then - echo "$FUNCNAME: usage error: missing value for option: $1" >&2 + echo "$FUNCNAME: missing argument for parameter: $1" >&2 return 1 fi shift ; c_flags+=("$1") ; shift ;; + -h) + echo "usage: $FUNCNAME [-h] [--c-flags FLAG]" + return 0 + ;; + --) shift ; break ;; @@ -53,11 +58,16 @@ runcxx() ( case "$1" in --cxx-flags) if [ "$#" -le 1 ]; then - echo "$FUNCNAME: usage error: missing value for option: $1" >&2 + echo "$FUNCNAME: missing argument for parameter: $1" >&2 return 1 fi shift ; cxx_flags+=("$1") ; shift ;; + -h) + echo "usage: $FUNCNAME [-h] [--cxx-flags FLAG]" + return 0 + ;; + --) shift ; break ;; diff --git a/.bashrc_pgn b/.bashrc_pgn index 23d83b1..4e73e76 100644 --- a/.bashrc_pgn +++ b/.bashrc_pgn @@ -15,7 +15,7 @@ normalize_pgn() { append_pgn() { if [ "$#" -ne 2 ]; then - echo "$FUNCNAME: usage: $FUNCNAME DEST_PGN SRC_PGN" >&2 + echo "usage: $FUNCNAME DEST_PGN SRC_PGN" >&2 return 1 fi diff --git a/.bashrc_third_party b/.bashrc_third_party index 30a3b2b..cddbb6c 100644 --- a/.bashrc_third_party +++ b/.bashrc_third_party @@ -22,7 +22,7 @@ symlink_preferences() ( set -o errexit if [ "$#" -ne 2 ]; then - echo "$FUNCNAME: usage: $FUNCNAME SRC_DIR DEST_DIR" >&2 + echo "usage: $FUNCNAME SRC_DIR DEST_DIR" >&2 return 1 fi |