Fish Shell
Fish has been my shell of choice since someone told me about it in abt late 2019 - early 2020. I hadn’t really taken a look at it’s shell scripting language other than some minor aliases and shortcuts, but my recent project on my fish_ssg has me more involved.
Variables
set tags "title" "type" "" "date-created" "date-modified"
set test $argv[1] # this will be the first argument after the script is called
$tags[1] # -> title
Conditionals
for tag in $tags
if not string match -q "title" $tag
switch $tag
case "type"
# do something
case "date-created"
# do something
case '*'
echo "default output"
end
end
end