* [PATCH] [DNM] builtin: add source for Bash compat
@ 2025-08-28 21:12 Eduardo Santos
2025-09-14 22:22 ` Sebastien Peterson-Boudreau
0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Santos @ 2025-08-28 21:12 UTC (permalink / raw)
To: dash; +Cc: Eduardo Santos
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 <eduardo.experimental@gmail.com>
---
src/builtins.def.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/builtins.def.in b/src/builtins.def.in
index 95e420c..7a7d68a 100644
--- a/src/builtins.def.in
+++ b/src/builtins.def.in
@@ -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
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [DNM] builtin: add source for Bash compat
2025-08-28 21:12 [PATCH] [DNM] builtin: add source for Bash compat Eduardo Santos
@ 2025-09-14 22:22 ` Sebastien Peterson-Boudreau
0 siblings, 0 replies; 2+ messages in thread
From: Sebastien Peterson-Boudreau @ 2025-09-14 22:22 UTC (permalink / raw)
To: dash
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.
--
S.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-14 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 21:12 [PATCH] [DNM] builtin: add source for Bash compat Eduardo Santos
2025-09-14 22:22 ` Sebastien Peterson-Boudreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox