I got the following variable:
set location "America/New_York"
and want to display only the part before the /
(slash) using fish
shell syntax.
Expected result
America
Bash equivalent
Using bash, I was simply using a parameter expansion:
location="America/New_York"
echo ${location##*/}"
Question
How do I do that in a fish
-way?
set a, b (string split / foo/bar)
– Fennel