Trying to get prompt

This commit is contained in:
2025-03-25 21:49:30 -04:00
parent c46c50737f
commit 95c5a9cccc
2 changed files with 52 additions and 0 deletions

7
src/get_prompt.bash Normal file
View File

@@ -0,0 +1,7 @@
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}" == "${check_ver}" ]]; then
echo "[${USER}@${HOSTNAME} ${PWD##*/}]$ "
else
echo "${PS1@P}"
fi