diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-26 04:48:56 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-07-26 04:48:56 +0300 |
commit | 469ad1e765cd34523baf4015c3d21d7432c5ab0d (patch) | |
tree | 2ad9ce61304d38fe0fe02d67eac957f611ba04b0 /.bashrc_cxx | |
parent | list_repo_*: add command line options (diff) | |
download | linux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.tar.gz linux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.zip |
fix/add missing usage messages for functions
Diffstat (limited to '.bashrc_cxx')
-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 ;; |