aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-09-25 21:58:53 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-09-25 21:58:53 +1200
commit2cf7da32157df4c2842282abb19fb12b6e4f2d91 (patch)
tree3c2ad1e7bcf8b15fc1efeccceb586e55156c7036 /bash
parentAdd some shortcut definitions for Tabular (diff)
downloaddotfiles-2cf7da32157df4c2842282abb19fb12b6e4f2d91.tar.gz
dotfiles-2cf7da32157df4c2842282abb19fb12b6e4f2d91.zip
Better prompt bell implementation
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc9
1 files changed, 2 insertions, 7 deletions
diff --git a/bash/bashrc b/bash/bashrc
index d3fe6bdf..d5a0e710 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -151,11 +151,6 @@ alias gdb='gdb -q'
# I always want a unified diff.
alias diff='diff -u'
-# Function to send a bell character.
-function bell {
- builtin echo -ne '\a'
-}
-
# Attach to existing tmux session rather than create a new one if possible.
function tmux {
if [[ -n "$*" ]]; then
@@ -181,7 +176,7 @@ function prompt {
# Turn complex coloured prompt on.
on)
PROMPT_COMMAND='history -a'
- PS1='[\u@\h:\w]$(prompt return)$(prompt vcs)$(prompt jobs)$(bell)\$'
+ PS1='\[\a\][\u@\h:\w]$(prompt return)$(prompt vcs)$(prompt jobs)\$'
PS1="${color_prompt}${PS1}${color_norm} "
case "$TERM" in
screen*) PS1='\[\ek\h\e\\\]'${PS1};;
@@ -193,7 +188,7 @@ function prompt {
# Revert to simple inexpensive prompt.
off)
PROMPT_COMMAND=
- PS1='\$ '
+ PS1='\[\a\]\$ '
;;
# Git prompt function.