From 44cb0af64f4c3ed3f4193fb2ece344c3a248adce Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 3 Oct 2023 10:24:36 +0300 Subject: [PATCH] Shell: source $HOME/.shellrc if found on Shell startup --- base-sysroot.tar.gz | Bin 8137 -> 8147 bytes userspace/Shell/main.cpp | 23 +++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/base-sysroot.tar.gz b/base-sysroot.tar.gz index a818f495d6cdba2d86cad519d4d32582cfd5cfe9..590909752fad60b9c3cc582ab757ad80a63acc30 100644 GIT binary patch literal 8147 zcmaiY_d6R7&^TIEEz;KBRkdpG5u{d)B35e?)fR1uy$Q7`s%EWd&6d{Q#NMk#ZGs?0 zjR-;#$@}@f?;r5J=bn4+x##x%aL*lY(oKs0g=_z8Ljt+}_;oFe4Pu(%qJLT226}m- zC&m_X{}@ybSdT$?^l$Rrd7;@InfC6-fmE>er)_G<{Q;%Kz!FMl_VHqAHmqFgaX6ca zf3Jdjw4vMg@0t9>1Kv$u*7og6Q(Hgdsj%_!PX3X)o_lxphg|}~ec(P*t++zMve(33 zu*}-mVvFa`>!3_z#rBkpY)fr^=FBv`4}a72baVuMkIu;{X3l-^p_!L!wor8AaC_tG zs%(L%o$mT-7M1!;Wzt=WU}?b>d3Bap$M*ZtV5_5{-~rOCtmM)qa&NTcwOJ8#H?dpkRg zqJ!1+A|%e=q`(!Ix85}}`)iz5A$gQP{TzPN z=^Xmge$4_H4i-8f7cYQz9Lb`)m(WjSPS_V0MC`~gDJL_lZ7|{TD&XHmDwzbHPl)G9 zHX@OLe41MSFdk7yPENPcH=?hhtAh+ikbxSTi=agl z@rax;^dS9+Y#1-s z8LH2DHD{8_Pb`l2EEx2DS@pvfborP6;&1T>^9nz}l~74|O>+Pk3Oy>qksJ01c=dk= zK3=A(?&T;Qu7+knQ*-)vH(@%!YuxMl5`(0-9DT_Li|0>13G0uGI4LE`{4Irhe!(}N zikuyR-~Is|C;XijZl+aUPwzUWbt7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G90R*0{#Oyy5cR}8JOoDOtXXHjEm0sq1r{(%zh zz1GLM=VtsC`n`~%UvzxId&j3T;igC~;Mf+U9)540wnW(oq=l%{i4ZbnBYjbX!@*xO z3eIq^2HHoZ!Yi*HkpoPY_sPg+@omXzXKgsW4W>_{IiFDn#qPX1$IdHZ{O diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 6ca69868..2da632e1 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -691,6 +691,24 @@ int source_script(const BAN::String& path) return ret; } +bool exists(const BAN::String& path) +{ + struct stat st; + return stat(path.data(), &st) == 0; +} + +int source_shellrc() +{ + if (char* home = getenv("HOME")) + { + BAN::String path(home); + MUST(path.append("/.shellrc"sv)); + if (exists(path)) + return source_script(path); + } + return 0; +} + int character_length(BAN::StringView prompt) { int length { 0 }; @@ -717,7 +735,7 @@ BAN::String get_prompt() { const char* raw_prompt = getenv("PS1"); if (raw_prompt == nullptr) - return ""sv; + return "$ "sv; BAN::String prompt; for (int i = 0; raw_prompt[i]; i++) @@ -853,7 +871,8 @@ int main(int argc, char** argv) if (argc >= 1) setenv("SHELL", argv[0], true); - setenv("PS1", "\e[32m\\u@\\h\e[m:\e[34m\\~\e[m$ ", false); + + source_shellrc(); tcgetattr(0, &old_termios);