diff options
Diffstat (limited to '')
-rw-r--r-- | .bashrc_cxx | 14 |
1 files changed, 12 insertions, 2 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 ;; |