Mercurial > index.cgi > dotfiles
diff .bashrc @ 256:d868be3816bf
New prompt settings to test out, works well on the Mac so far.
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Thu, 28 Mar 2024 19:26:06 -0400 |
parents | 7833786173da |
children | 15543c169f36 |
line wrap: on
line diff
--- a/.bashrc Wed Mar 27 18:39:22 2024 -0400 +++ b/.bashrc Thu Mar 28 19:26:06 2024 -0400 @@ -25,14 +25,9 @@ # # Environment variables # -#[[ "$PS1" ]] && export PS1='${debian_chroot:+($debian_chroot)}\e[01;32m\h\e[00m:\e[01;34m\w\e[00m\$ ' -[[ "$PS1" ]] && { - if [ -z "$DARWIN" ] ; then - export PS1='${debian_chroot:+($debian_chroot)}\[\e[01;`case $EUID in 0) echo -n 31; ;; *) echo -n 32; ;; esac;`m\]\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\$ ' - else - export PS1='${debian_chroot:+($debian_chroot)}\[\e[01;`case $EUID in 0) echo "31\c"; ;; *) echo -n 32; ;; esac;`m\]\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\$ ' - fi -} + +[[ "$PS1" ]] && . $HOME/.bash_prompt + export PAGER=less export EDITOR=vim export RUBYLIB=$HOME/Installs/rubygems/lib @@ -44,25 +39,8 @@ export SCREENRC=$HOME/.screen/$HOST fi -# If this is an xterm set the title to user@host:dir -case $TERM in - xterm*|rxvt*) - PROMPT_COMMAND='history -a ; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' - ;; - screen.xterm-256color) - # Specifically, to hell with this one - export TERM=screen-256color - # Copied from below because the Mac's bash doesn't grok ;& as a - # passthrough - PROMPT_COMMAND="history -a" - ;; - screen*) - # But if it's a screen window, leave it alone please - PROMPT_COMMAND="history -a" - ;; - *) - ;; -esac +# Specifically, to hell with this one +[[ $TERM =~ screen.xterm-256color ]] && export TERM=screen-256color # Set some friendly options for history # Append to ~/.bash_history, don't overwrite it