summaryrefslogtreecommitdiffstats
path: root/bin/isolated-functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/isolated-functions.sh')
-rw-r--r--bin/isolated-functions.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 20be25e77..c257a10d5 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -206,4 +206,21 @@ RC_ENDCOL="yes"
RC_INDENTATION=''
RC_DEFAULT_INDENT=2
RC_DOT_PATTERN=''
+
+has() {
+ hasq "$@"
+}
+
+hasv() {
+ if hasq "$@" ; then
+ echo "$1"
+ return 0
+ fi
+ return 1
+}
+
+hasq() {
+ [[ " ${*:2} " == *" $1 "* ]]
+}
+
true