Mercurial > index.cgi > dotfiles
comparison .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 |
comparison
equal
deleted
inserted
replaced
253:282804a3a32b | 256:d868be3816bf |
---|---|
23 fi | 23 fi |
24 | 24 |
25 # | 25 # |
26 # Environment variables | 26 # Environment variables |
27 # | 27 # |
28 #[[ "$PS1" ]] && export PS1='${debian_chroot:+($debian_chroot)}\e[01;32m\h\e[00m:\e[01;34m\w\e[00m\$ ' | 28 |
29 [[ "$PS1" ]] && { | 29 [[ "$PS1" ]] && . $HOME/.bash_prompt |
30 if [ -z "$DARWIN" ] ; then | 30 |
31 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\]\$ ' | |
32 else | |
33 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\]\$ ' | |
34 fi | |
35 } | |
36 export PAGER=less | 31 export PAGER=less |
37 export EDITOR=vim | 32 export EDITOR=vim |
38 export RUBYLIB=$HOME/Installs/rubygems/lib | 33 export RUBYLIB=$HOME/Installs/rubygems/lib |
39 export GEM_HOME=$HOME/Installs/rubygems/gems | 34 export GEM_HOME=$HOME/Installs/rubygems/gems |
40 export TOMENET_PATH=$HOME/Installs/tomenet/lib/ | 35 export TOMENET_PATH=$HOME/Installs/tomenet/lib/ |
42 | 37 |
43 if [ -f $HOME/.screen/$HOST ]; then | 38 if [ -f $HOME/.screen/$HOST ]; then |
44 export SCREENRC=$HOME/.screen/$HOST | 39 export SCREENRC=$HOME/.screen/$HOST |
45 fi | 40 fi |
46 | 41 |
47 # If this is an xterm set the title to user@host:dir | 42 # Specifically, to hell with this one |
48 case $TERM in | 43 [[ $TERM =~ screen.xterm-256color ]] && export TERM=screen-256color |
49 xterm*|rxvt*) | |
50 PROMPT_COMMAND='history -a ; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' | |
51 ;; | |
52 screen.xterm-256color) | |
53 # Specifically, to hell with this one | |
54 export TERM=screen-256color | |
55 # Copied from below because the Mac's bash doesn't grok ;& as a | |
56 # passthrough | |
57 PROMPT_COMMAND="history -a" | |
58 ;; | |
59 screen*) | |
60 # But if it's a screen window, leave it alone please | |
61 PROMPT_COMMAND="history -a" | |
62 ;; | |
63 *) | |
64 ;; | |
65 esac | |
66 | 44 |
67 # Set some friendly options for history | 45 # Set some friendly options for history |
68 # Append to ~/.bash_history, don't overwrite it | 46 # Append to ~/.bash_history, don't overwrite it |
69 shopt -s histappend | 47 shopt -s histappend |
70 # Set the history a bit larger, both on disk and in memory | 48 # Set the history a bit larger, both on disk and in memory |