builtin: add source for Bash compat
PATCH 1/1 builtin: add source for Bash compat
Do not merge this patch; it is purely informational.
I tried using DASH in a container image for GitLab CI/CD [1] but the runner expects the source special builtin from Bash to be available. This one-liner fixed it for me.
[1] https://docs.gitlab.com/runner/configuration/advanced-configuration/#use-a-posix-compliant-shell
Signed-off-by Eduardo Santos <[email protected]>
--- src/builtins.def.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/builtins.def.in +1 -1
@@ -61,7 +61,7 @@ histcmd -u fc breakcmd -s break -s continue cdcmd -u cd chdir commandcmd -u command -dotcmd -s . +dotcmd -s . -s source echocmd echo evalcmd -ns eval execcmd -s exec
Signature · 1 line
2.51.0
FWIW, this can also be done with a function inside the shell itself :)
source () {
. "$@"
}...hopefully I used the correct special parameter and quotes, but in most cases you can probably just use $1 and be fine.
Signature · 1 line
S.