summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/functions b/functions
index 74f0e0b..80844de 100644
--- a/functions
+++ b/functions
@@ -6,14 +6,15 @@ smallyes() {
}
in_path () {
- IFS=":" _in_path "$1"
-}
-_in_path () {
+ local OLD_IFS="$IFS"
+ IFS=":"
for dir in $PATH; do
if [ -x "$dir/$1" ]; then
+ IFS="$OLD_IFS"
return 0
fi
done
+ IFS="$OLD_IFS"
return 1
}