New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encourage $HOME over tilde (~) for dash/gnutls/make compatibility #195
Comments
|
Tilde expansion is required by POSIX and consequently supported by dash and all other compatible shells. Tilde expansion has additional capabilities that Make is not shell. There should never be a case where shell code is evaluated by make. The only time a shell script should be together with make is if make is invoking a shell. You should never have a literal |
On my computers, a literal On my computers,
|
|
It sounds to me like you've discovered a bug in Bash. No other shell does it and it isn't documented in the bash manual or specified by POSIX or any other documentation I've read. What you describe only appears to apply to test:output:I don't think it's likely Bash is correct in expanding the tilde during command search. You should definitely not put either |
|
Oh, that's interesting! Here's my .bashrc as another example: https://github.com/mcandre/dotfiles/blob/master/.bashrc-wi Thanks for taking an interest in this question. I don't know why things are On Mon, Jul 21, 2014 at 6:05 PM, Dan Douglas notifications@github.com
Cheers, Andrew Pennebaker |
|
Nice one. 0347ce1 warns about quoted ~s being assigned in PATH. It's not perfect, but should catch most instances. |
I've been bitten a few times by trying to use tildes in my scripts, especially when setting my PATH variable. When GNU make tries to find executables, it fails to find them, because it likes to fork out shells with
dashinstead ofbash, and dash does not translate tildes. I love linting my scripts and dotfiles with shellcheck, but shellcheck doesn't catch this for me yet.Could we please add a linting rule encouraging
$HOMEover~for dash/gnutls/make compatibility?The text was updated successfully, but these errors were encountered: