diff options
Diffstat (limited to 'Userland/Shell/Builtin.cpp')
-rw-r--r-- | Userland/Shell/Builtin.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Shell/Builtin.cpp b/Userland/Shell/Builtin.cpp index 3d9a54cd3c..2238de8b3c 100644 --- a/Userland/Shell/Builtin.cpp +++ b/Userland/Shell/Builtin.cpp @@ -1328,6 +1328,8 @@ ErrorOr<bool> Shell::run_builtin(const AST::Command& command, Vector<NonnullRefP if (name == ":"sv) name = "noop"sv; + else if (m_in_posix_mode && name == "."sv) + name = "source"sv; #define __ENUMERATE_SHELL_BUILTIN(builtin, _mode) \ if (name == #builtin) { \ @@ -1921,7 +1923,7 @@ ErrorOr<int> Shell::builtin_run_with_env(Main::Arguments arguments) bool Shell::has_builtin(StringView name) const { - if (name == ":"sv) + if (name == ":"sv || (m_in_posix_mode && name == "."sv)) return true; #define __ENUMERATE_SHELL_BUILTIN(builtin, mode) \ |