在 bash 中,我可以用
unset myvar
在鱼里
fish: Unknown command 'unset'
在鱼类中未定型的等价物是什么。
Fish uses options on the set command to manipulate shell variables.
set
Unset a variable with the -e or --erase option.
-e
--erase
set -e myvar
Additionally you can define a function
function unset set --erase $argv end funcsave unset
or an abbreviation
abbr --add unset 'set --erase'
or an alias in ~/.config/fish/config.fish
~/.config/fish/config.fish
alias unset 'set --erase'