aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.bashrc_cxx
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-07-26 04:48:56 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-07-26 04:48:56 +0300
commit469ad1e765cd34523baf4015c3d21d7432c5ab0d (patch)
tree2ad9ce61304d38fe0fe02d67eac957f611ba04b0 /.bashrc_cxx
parentlist_repo_*: add command line options (diff)
downloadlinux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.tar.gz
linux-home-469ad1e765cd34523baf4015c3d21d7432c5ab0d.zip
fix/add missing usage messages for functions
Diffstat (limited to '')
-rw-r--r--.bashrc_cxx14
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 ;;