aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-06-21 11:26:23 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-06-21 11:26:23 +1200
commit685234af1f48e976fd57ec04d4a253bcabfad4ea (patch)
treee8b232b7d2a9ffc9f18b5fa82667277ceff98e0b /bash/bashrc.d/prompt.bash
parentRemove unneeded line-break backslashes (diff)
downloaddotfiles-685234af1f48e976fd57ec04d4a253bcabfad4ea.tar.gz
dotfiles-685234af1f48e976fd57ec04d4a253bcabfad4ea.zip
Remove unneeded linebreak backslashes
Handy command: $ find bin sh bash -type f -exec grep \ -e '|| \\$' \ -e '&& \\$' \ -e '^\s*||' \ -e '^\s*&&' \ {} +
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r--bash/bashrc.d/prompt.bash16
1 files changed, 8 insertions, 8 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index eee81d95..6d90547f 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -53,10 +53,10 @@ prompt() {
256)
format=$( {
: "${PROMPT_COLOR:=10}"
- tput AF "$PROMPT_COLOR" \
- || tput setaf "$PROMPT_COLOR" \
- || tput AF "$PROMPT_COLOR" 0 0 \
- || tput setaf "$PROMPT_COLOR" 0 0
+ tput AF "$PROMPT_COLOR" ||
+ tput setaf "$PROMPT_COLOR" ||
+ tput AF "$PROMPT_COLOR" 0 0 ||
+ tput setaf "$PROMPT_COLOR" 0 0
} 2>/dev/null )
;;
@@ -64,8 +64,8 @@ prompt() {
8)
format=$( {
: "${PROMPT_COLOR:=2}"
- tput AF "$PROMPT_COLOR" \
- || tput setaf "$PROMPT_COLOR"
+ tput AF "$PROMPT_COLOR" ||
+ tput setaf "$PROMPT_COLOR"
tput md || tput bold
} 2>/dev/null )
;;
@@ -104,8 +104,8 @@ prompt() {
# Attempt to determine git branch, bail if we can't
local branch
branch=$( {
- git symbolic-ref --quiet HEAD \
- || git rev-parse --short HEAD
+ git symbolic-ref --quiet HEAD ||
+ git rev-parse --short HEAD
} 2>/dev/null )
if [[ ! -n $branch ]] ; then
return 1