Improve --help and --complete argument handling

This commit is contained in:
2013-06-03 09:32:13 +03:00
parent 7d91ca4292
commit f9c91e5fcd
17 changed files with 83 additions and 24 deletions

11
lib/util.sh Normal file
View File

@@ -0,0 +1,11 @@
calling-help() {
if [[ " $@ " != *" --help "* ]] && [[ " $@ " != *" -h "* ]]; then
return 1
fi
}
calling-complete() {
if [[ " $@ " != *" --complete "* ]]; then
return 1
fi
}