aboutsummaryrefslogtreecommitdiffhomepage
path: root/share
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-08-02 08:55:54 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-08-02 08:55:54 +1000
commit20526687b24a6fe07baa3602a4d88841d4716a55 (patch)
treef7e5d4249854f1251f1280b910ad8e7df20969a4 /share
parent0a0870180d79749aa1ffd9ea5679f3ff3d8c0cc3 (diff)
Drop contains function, since we now have a builtin.
darcs-hash:20070801225554-75c98-cbaba63efdd06277364cc9b3ef871b9e76a7edb9.gz
Diffstat (limited to 'share')
-rw-r--r--share/functions/contains.fish43
1 files changed, 0 insertions, 43 deletions
diff --git a/share/functions/contains.fish b/share/functions/contains.fish
deleted file mode 100644
index 958e465b..00000000
--- a/share/functions/contains.fish
+++ /dev/null
@@ -1,43 +0,0 @@
-
-function contains --description "Test if a key is contained in a set of values"
- while count $argv >/dev/null
- switch $argv[1]
- case '-h' '--h' '--he' '--hel' '--help'
- __fish_print_help contains
- return
-
- case '--'
- # End the loop, the next argument is the key
- set -e argv[1]
- break
-
- case '-*'
- printf (_ "%s: Unknown option '%s'\n") contains $argv[1]
- __fish_print_help contains >&2
- return 1
-
- case '*'
- # End the loop, we found the key
- break
-
- end
- set -e argv[1]
- end
-
- if not count $argv >/dev/null
- printf (_ "%s: Key not specified\n") contains
- return 1
- end
-
- set key $argv[1]
- set -e argv[1]
-
- #
- # Loop through values
- #
-
- printf "%s\n" $argv|sgrep -Fx -- $key >/dev/null
- return $status
-end
-
-