summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/aliases.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/functions/aliases.sh b/functions/aliases.sh
index 031dc0e77..c4e029038 100755
--- a/functions/aliases.sh
+++ b/functions/aliases.sh
@@ -16,3 +16,22 @@ Truncate ()
: > ${FILE}
done
}
+
+In_list ()
+{
+ NEEDLES="${1}"
+ shift
+
+ for ITEM in ${@}
+ do
+ for NEEDLE in ${NEEDLES}
+ do
+ if [ "${NEEDLE}" = "${ITEM}" ]
+ then
+ return 0
+ fi
+ done
+ done
+
+ return 1
+}