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 Shell::run_builtin(const AST::Command& command, Vector 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) \ diff --git a/Userland/Shell/Shell.h b/Userland/Shell/Shell.h index a34a84f968..b425333183 100644 --- a/Userland/Shell/Shell.h +++ b/Userland/Shell/Shell.h @@ -462,7 +462,11 @@ private: #undef __ENUMERATE_SHELL_BUILTIN + "."sv, // Needs to be aliased to "source" in POSIX mode. + // clang-format off + // Clang-format does not properly indent this, it gives it 4 spaces too few. ":"sv, // POSIX-y name for "noop". + // clang-format on }; bool m_should_ignore_jobs_on_next_exit { false };