In bash I can unset a variable with
unset myvarIn fish I get
fish: Unknown command 'unset'What's the equivalent for unset in fish.
1 Answer
Fish uses options on the set command to manipulate shell variables.
Unset a variable with the -e or --erase option.
set -e myvar Additionally you can define a function
function unset set --erase $argv
end
funcsave unsetor an abbreviation
abbr --add unset 'set --erase'or an alias in ~/.config/fish/config.fish
alias unset 'set --erase' 2