Last active
April 28, 2016 10:20
-
-
Save dfdgsdfg/96b14b77f718d941cc028a72751f2e86 to your computer and use it in GitHub Desktop.
short_noob_question.fish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g items "item1" "item2" "item3" | |
function itme1 | |
set -g item1_exists "false" | |
switch $argv | |
case check | |
if exists item1 | |
set item1_exists "true" | |
end | |
case do | |
command item1 | |
end | |
end | |
function do | |
for item in $items | |
/////////////////////////////////////////// How can I check | |
if test "$item"_exist = "true" | |
eval $item "do" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment