Vojt??ch, et al -- ...and then Vojt??ch Zeisek said... % ... % # Alias % test -s ~/.alias && . ~/.alias || true % ... % For more information: % https://www.shellcheck.net/wiki/SC1090 -- Can't follow non-constant source.... % https://www.shellcheck.net/wiki/SC2015 -- Note that A && B || C is not if-t... % % The second warning SC1090 seems like false positive (waiting for some % ShellCheck update), but the first SC2015 seems like really problematic % code, but I'm not sure if I fully get what's going on in this % syntactical cleanup. What should be the super clean correct code here? % Is this default worth of change? I don't like that code at all. It's guaranteed to succeed, whether .alias exists with a non-zero length and parses happily, or .alias doesn't exist, or .alias exists AND HITS A FAILURE, which doesn't make sense. Much better would be test ! -s ~/.alias || . ~/.alias (perhaps with an escaped bang) so that when it is sourced you get the actual result code out of it. As for SC1090, the parser can't give a final answer because the flow depends on executing code. It's simply warning you that the results are incomplete. % % -- % Vojt??ch Zeisek % https://trapa.cz/ HTH & HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt