mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00

- split zsh into many files - add bash support - cleaned up lots of stuff, created a commonsh folder for common stuff between bash and zsh - commonsh supports an order of execution, deliminated by filename. This is to enforce dependencies All of these changes were needed so that we could sensibly continue to extend the system
23 lines
552 B
Text
Executable file
23 lines
552 B
Text
Executable file
function do_prompt ()
|
|
{
|
|
if [ $? -ne 0 ] ; then
|
|
local ERROR_PROMPT="\[\033[01;31m\]"
|
|
fi
|
|
|
|
local BASE
|
|
if [ $UID -ne 0 ] ; then
|
|
BASE="$"
|
|
else
|
|
BASE="#"
|
|
fi
|
|
export PS1="\[\033[01;32m\]\u@\h \[\033[01;34m\]\w ${ERROR_PROMPT}${BASE} \[\033[00m\]"
|
|
|
|
[[ $TERM != "cons*" ]] && [[ $TERM != "linux" ]] &&
|
|
echo -ne "\033]0;${USER}@${HOSTNAME}\007"
|
|
}
|
|
|
|
|
|
PROMPT_COMMAND=do_prompt
|
|
|
|
[[ $TERM != "cons*" ]] && [[ $TERM != "linux" ]] &&
|
|
trap 'echo -e "\e]1;${USER}@${HOSTNAME}: $BASH_COMMAND\007\c"' DEBUG
|