aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-07-21 18:27:08 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-07-21 18:27:08 +1200
commit752cdfd035e77dc87d6ac8e598f2d3ada295db9f (patch)
tree30fed8c834047ac7928df6804b5ef8cd6eae2954 /bash
parentMove Bash options into separate file (diff)
downloaddotfiles-752cdfd035e77dc87d6ac8e598f2d3ada295db9f.tar.gz
dotfiles-752cdfd035e77dc87d6ac8e598f2d3ada295db9f.zip
Remove trailing spaces before closing parentheses
I was only doing this to work around a Bash syntax highlighting bug
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/grep.bash2
-rw-r--r--bash/bashrc.d/ls.bash2
-rw-r--r--bash/bashrc.d/prompt.bash12
3 files changed, 8 insertions, 8 deletions
diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash
index 625f10ac..7ac80518 100644
--- a/bash/bashrc.d/grep.bash
+++ b/bash/bashrc.d/grep.bash
@@ -1,7 +1,7 @@
# Function returns calculated options for grep
function __grepopts {
local grepopts='-I'
- local grephelp=$(grep --help )
+ local grephelp=$(grep --help)
echo $grephelp | grep -- --color &>/dev/null \
&& grepopts="${grepopts} --color=auto"
echo $grephelp | grep -- --exclude &>/dev/null \
diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash
index 3883c99a..24bdf4ac 100644
--- a/bash/bashrc.d/ls.bash
+++ b/bash/bashrc.d/ls.bash
@@ -4,7 +4,7 @@ eval "$(dircolors -b &>/dev/null)"
# Function returns calculated options for ls
function __lsopts {
local lsopts=
- local lshelp=$(ls --help )
+ local lshelp=$(ls --help)
echo $lshelp | grep -- --color &>/dev/null \
&& lsopts="${lsopts} --color=auto"
echo $lsopts
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index f77e062a..26f9f87a 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -29,22 +29,22 @@ function prompt {
# Git prompt function
git)
- $(git rev-parse --is-inside-git-dir 2>/dev/null ) \
+ $(git rev-parse --is-inside-git-dir 2>/dev/null) \
&& return 1
- $(git rev-parse --is-inside-work-tree 2>/dev/null ) \
+ $(git rev-parse --is-inside-work-tree 2>/dev/null) \
|| return 1
git status &>/dev/null
- branch=$(git symbolic-ref --quiet HEAD 2>/dev/null ) \
- || branch=$(git rev-parse --short HEAD 2>/dev/null ) \
+ branch=$(git symbolic-ref --quiet HEAD 2>/dev/null) \
+ || branch=$(git rev-parse --short HEAD 2>/dev/null) \
|| branch='unknown'
branch=${branch##*/}
git diff --quiet --ignore-submodules --cached \
|| state=${state}+
git diff-files --quiet --ignore-submodules -- \
|| state=${state}!
- $(git rev-parse --verify refs/stash &>/dev/null ) \
+ $(git rev-parse --verify refs/stash &>/dev/null) \
&& state=${state}^
- [ -n "$(git ls-files --others --exclude-standard )" ] \
+ [ -n "$(git ls-files --others --exclude-standard)" ] \
&& state=${state}?
printf '(git:%s)' "${branch:-unknown}${state}"
;;