minor changed

This commit is contained in:
Pin
2022-03-30 20:33:57 -04:00
parent 47dbcb4e64
commit ec7c907ced

4
msh.c
View File

@@ -136,8 +136,8 @@ char *getPrompt() {
execlp("bash", "bash", "-i", "-c", "\
ver=$(bash --version | head -n 1 | awk \'{print $4}\' | grep -o \"...\");\
check_ver=$(echo -e \"${ver}\n4.3\" | sort -V | head -n 1);\
if [[ \"${ver}\" == \"4.3\" ]]; then\
echo \"[${USER}@${pwd}]\";\
if [[ \"${check_ver}\" == \"4.3\" ]]; then\
echo \"[${USER}]\";\
else\
echo \"${PS1@P}\";\
fi\