summaryrefslogtreecommitdiff
path: root/bashrc
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-06-14 22:28:33 +0300
committerLars Wirzenius <liw@liw.fi>2017-01-15 16:11:46 +0200
commit7749a460509c3c4cd41b0bec250a2e74746b795f (patch)
treec13f0a00ca0d6258a70c5b7ea0bba562a9f50149 /bashrc
parent9df7433cef6021b3e351df1805c2c5fdfc2e3a67 (diff)
downloadliw-dot-files-7749a460509c3c4cd41b0bec250a2e74746b795f.tar.gz
Revert "Fix PS1 escaping"
This reverts commit 28cb7e7f20d5fe1e5765a6fcde2f452efc8dba8f.
Diffstat (limited to 'bashrc')
-rw-r--r--bashrc12
1 files changed, 2 insertions, 10 deletions
diff --git a/bashrc b/bashrc
index 805807d..c7ab407 100644
--- a/bashrc
+++ b/bashrc
@@ -52,7 +52,7 @@ git_prompt_part()
{
if is_git_repo
then
- echo -n "$(normal_mode)[$(get_git_branch)]$(start_bold)"
+ echo -n "\\[$(normal_mode)\\][$(get_git_branch)]\\[$(start_bold)\\]"
fi
}
@@ -66,7 +66,7 @@ prompt_command() {
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_bold)\\]$debian_chroot\\u@\\h$(git_prompt_part)$(basename_mode)(\w)$(start_bold)\\$ \\[$(normal_mode)\\]"
}
we_have_term()
@@ -78,9 +78,7 @@ basename_mode()
{
if we_have_term
then
- echo -n "\\["
tput dim
- echo -n "\\]"
fi
}
@@ -88,10 +86,8 @@ start_error()
{
if we_have_term
then
- echo -n "\\["
tput bold
tput setaf 1
- echo -n "\\]"
fi
}
@@ -99,10 +95,8 @@ start_bold()
{
if we_have_term
then
- echo -n "\\["
tput sgr0
tput bold
- echo -n "\\]"
fi
}
@@ -110,9 +104,7 @@ normal_mode()
{
if we_have_term
then
- echo -n "\\["
tput sgr0
- echo -n "\\]"
fi
}