-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jacob Garby
committed
Apr 18, 2024
1 parent
07a1c9d
commit f6e93d2
Showing
2 changed files
with
4 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,2 @@ | ||
# Set RESMAN_ALERT to a red `!` when the system is reserved | ||
update_resman_alert() { | ||
if resman; then | ||
RESMAN_ALERT="" | ||
else | ||
RESMAN_ALERT=$'\e[31m!\e[0m' | ||
fi | ||
} | ||
|
||
PS1='${RESMAN_ALERT}'$PS1 | ||
|
||
# Recompute RESMAN_ALERT every time the prompt is refreshed | ||
PROMPT_COMMAND="update_resman_alert;${PROMPT_COMMAND:+$PROMPT_COMMAND}" | ||
_RESMAN_WORD="server in use..." | ||
PS1='$(if resman; then echo; else printf "\[\033[0;31m\](${_RESMAN_WORD})\[\033[0m\] "; fi)'"${PS1}" |