I think one should be able to switch on a variable that may or may not be set:
switch $LANG
case 'en_US*'
...
end
If $LANG is unset:
fish: switch: Expected exactly one argument, got 0
(Same with command substitutions which may sometimes print nothing.)
I think it should just silently short circuit and do nothing.
I think one should be able to
switchon a variable that may or may not be set:If
$LANGis unset:fish: switch: Expected exactly one argument, got 0(Same with command substitutions which may sometimes print nothing.)
I think it should just silently short circuit and do nothing.