summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-01-03 22:35:08 +0200
committerLars Wirzenius <liw@liw.fi>2017-01-15 16:11:49 +0200
commitac4a6b1cf960f1f1812e871907745711659ff24a (patch)
treeefdd36e4dfe2a4ebeb6e7bf9b443a209c812f99f /bashrc
parent5d5d8a05c16c308a2f419890db481cada7656b3a (diff)
downloadliw-dot-files-ac4a6b1cf960f1f1812e871907745711659ff24a.tar.gz
Add contexts, and don't show waiting, blocked
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc32
1 files changed, 19 insertions, 13 deletions
diff --git a/bashrc b/bashrc
index f415791..34993bd 100644
--- a/bashrc
+++ b/bashrc
@@ -56,17 +56,30 @@ git_prompt_part()
fi
}
+QL()
+{
+ case "$DEBEMAIL" in
+ *@qvarnlabs.com) echo '[QL] ' ;;
+ esac
+}
+
iconpart="`whoami`@`hostname`: "
titlepart="`whoami`@`hostname` -- "
prompt_command() {
prompt_status=$?
+ if [ -r /etc/debian_chroot ]
+ then
+ debian_chroot="$(cat /etc/debian_chroot) "
+ else
+ debian_chroot=""
+ fi
if [ $prompt_status != 0 ]
then
echo "$(start_error)[status $prompt_status]$(normal_mode)"
fi
base="`basename "$PWD"`"
str2xterm "$base - $iconpart$PWD" "$base - $titlepart$PWD"
- PS1="\\[$(start_bold)\\]$debian_chroot\\u@\\h$(git_prompt_part)\\[$(basename_mode)\\](\W)\\[$(start_bold)\\]\\$ \\[$(normal_mode)\\]"
+ PS1="\\[$(start_error)$(QL)$(normal_mode )\\]\\[$(start_bold)\\]$debian_chroot\\u@\\h$(git_prompt_part)\\[$(basename_mode)\\](\W)\\[$(start_bold)\\]\\$ \\[$(normal_mode)\\]"
}
we_have_term()
@@ -113,7 +126,7 @@ normal_mode()
ulimit -c unlimited
umask 002
-if command -v emacsclient > /dev/null
+if command -v emacs > /dev/null
then
export EDITOR=emacs
else
@@ -122,23 +135,16 @@ fi
export PAGER=less
export LESSCHARSET=utf-8
export HISTCONTROL=ignoredups
-export PATH="/usr/lib/ccache:$PATH:$HOME/bin"
+export PATH="$PATH:$HOME/bin"
export PROMPT_COMMAND=prompt_command
-export PS1='\$ '
export DEBEMAIL=liw@liw.fi
export VIRSH_DEFAULT_CONNECT_URI=qemu:///system
export LANG=en_GB.UTF-8
export LC_COLLATE=fi_FI.UTF-8
-if [ -r /etc/debian_chroot ]
-then
- debian_chroot="$(cat /etc/debian_chroot) "
-else
- debian_chroot=""
-fi
PROMPT_DIRTRIM=1
-# PS1 now set by PROMPT_COMMAND, since it is no longer static, and
-# may include data about current git branch.
-# PS1="\\[$(start_bold)\\]$debian_chroot\\u@\\h\\$ \\[$(normal_mode)\\]"
set +H
+bind -r ''
+
+echo TEMP BASHRC