mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Shell: Add a "." builtin that aliases to "source" in POSIX
This patch adds an alias to the source builtin when an user types ".". We cannot just add an enumeration entry using __ENUMERATE_SHELL_BUILTIN because "." is not a valid name in a function. This patch adds handling similarly to the name rewriting of ":". This alias is limited to POSIX mode only.
This commit is contained in:
parent
6e5457d9e0
commit
9531abcb1a
2 changed files with 7 additions and 1 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue