Here's a snippet or screenshot that shows the problem:
#!/bin/bash
. "${HOME}"/foo.sh
. ~/foo.sh
Here's what shellcheck currently says:
[Line 2:](javascript:setPosition(2, 3))
. "${HOME}"/foo.sh
^-- [SC1091](https://www.shellcheck.net/wiki/SC1091) (info): Not following: ./foo.sh was not specified as input (see shellcheck -x).
[Line 3:](javascript:setPosition(3, 3))
. ~/foo.sh
^-- [SC1090](https://www.shellcheck.net/wiki/SC1090) (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.
Here's what I wanted or expected to see:
Line 3 should recognize ~ as [approximately] equivalent to $HOME and pass SC1090 with the "strip a single expansion followed by a slash" exception described on the wiki, instead behaving like Line 2 and triggering SC1091 (or, if run with shellcheck -x, succeeding as Line 2 would)
For bugs
shellcheck --version
or "online"): 0.10.0 and onlineHere's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Line 3 should recognize
~
as [approximately] equivalent to$HOME
and pass SC1090 with the "strip a single expansion followed by a slash" exception described on the wiki, instead behaving like Line 2 and triggering SC1091 (or, if run withshellcheck -x
, succeeding as Line 2 would)