update: slightly WIP update with cool features

This commit is contained in:
2026-05-12 19:50:46 +03:00
parent a304ecefcc
commit 9d23965acc
47 changed files with 244 additions and 278 deletions

24
.bash_prompt Normal file
View File

@@ -0,0 +1,24 @@
# History append
shopt -s histappend
# Prompt
set_prompt() {
local EXIT_STATUS=$?
local SUCCESS="\[\e[32m\]"
local ERROR="\[\e[34m\]"
local RESET="\[\e[0m\]"
history -a
history -c
history -r
if [ $EXIT_STATUS -eq 0 ]; then
local COLOR=$SUCCESS
else
local COLOR=$ERROR
fi
# PS1="[\u@\h \W]${COLOR}\\\$${RESET} "
PS1="[\u@\h \! \W]${COLOR}\\\$${RESET} "
}
PROMPT_COMMAND=set_prompt