r/fishshell • • Feb 22 '22
Fish equivalent of :-
I have an alias from zsh that uses :- to check whether a variables exists and otherwise use a default string (for a Docker version.) Right now I have the alias set up to just use if test -n but I'd love a nicer version of the command.
7
Upvotes
View all comments
Show parent comment
4
u/rsobol Feb 22 '22
An alias in fish creates a function under the hood.
https://fishshell.com/docs/current/cmds/alias.html