Files
dotfiles/bashrc.d/prompt.bash
2025-07-22 13:59:07 +01:00

15 lines
382 B
Bash

prompt() {
# TODO needs rework for tmux, since I don't really use screen now.
if [ "$STY" != "" ] ; then
SESSION_NAME=$(echo $STY | sed -e 's/^.*\.//')
SESSION="[$SESSION_NAME] "
. $HOME/data/screen/"$SESSION_NAME".display
else
SESSION=""
fi
export PS1="$SESSION\u@\h:\w$ "
}
export PROMPT_DIRTRIM=5
export PROMPT_COMMAND=prompt