I believe source is a bashism, that POSIX shell only recognizes dot (.) instead. In the future, could checkbashisms report lines that contain source?
source
Note: Except for csh/tcsh, which are non-POSIX compliant. csh and tcsh only recognize source, not dot (.).
.
Some modern descendants like ash/dash do not recognize source, only dot (.), making this bashism check more important.
this is already handled. please post an example script where it doesn't work for you.
$ printf '#!/bin/sh\nsource foo\n' > test.sh $ checkbashisms test.sh possible bashism in test.sh line 2 (should be '.', not 'source'): source foo
Log in to post a comment.
Note: Except for csh/tcsh, which are non-POSIX compliant. csh and tcsh only recognize
source
, not dot (.
).Last edit: mcandre 2014-08-08
Some modern descendants like ash/dash do not recognize source, only dot (
.
), making this bashism check more important.this is already handled. please post an example script where it doesn't work for you.