Skip to content

Commit 79ee7bf

Browse files
committed
Updated scripts to standardize on 4 spaces.
1 parent 3dd969e commit 79ee7bf

File tree

10 files changed

+749
-749
lines changed

10 files changed

+749
-749
lines changed

.aliases

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ alias j="jobs"
1717

1818
# Detect which `ls` flavor is in use
1919
if ls --color > /dev/null 2>&1; then # GNU `ls`
20-
colorflag="--color"
20+
colorflag="--color"
2121
else # OS X `ls`
22-
colorflag="-G"
22+
colorflag="-G"
2323
fi
2424

2525
# List all files colorized in long format
@@ -120,7 +120,7 @@ alias map="xargs -n1"
120120

121121
# One of @janmoesen’s ProTip™s
122122
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
123-
alias "$method"="lwp-request -m '$method'"
123+
alias "$method"="lwp-request -m '$method'"
124124
done
125125

126126
# Make Grunt print stack traces by default

.bash_prompt

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,103 +4,103 @@
44
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
55

66
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
7-
export TERM='gnome-256color';
7+
export TERM='gnome-256color';
88
elif infocmp xterm-256color >/dev/null 2>&1; then
9-
export TERM='xterm-256color';
9+
export TERM='xterm-256color';
1010
fi;
1111

1212
prompt_git() {
13-
local s='';
14-
local branchName='';
13+
local s='';
14+
local branchName='';
1515

16-
# Check if the current directory is in a Git repository.
17-
if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then
16+
# Check if the current directory is in a Git repository.
17+
if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then
1818

19-
# check if the current directory is in .git before running git checks
20-
if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
19+
# check if the current directory is in .git before running git checks
20+
if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then
2121

22-
# Ensure the index is up to date.
23-
git update-index --really-refresh -q &>/dev/null;
22+
# Ensure the index is up to date.
23+
git update-index --really-refresh -q &>/dev/null;
2424

25-
# Check for uncommitted changes in the index.
26-
if ! $(git diff --quiet --ignore-submodules --cached); then
27-
s+='+';
28-
fi;
25+
# Check for uncommitted changes in the index.
26+
if ! $(git diff --quiet --ignore-submodules --cached); then
27+
s+='+';
28+
fi;
2929

30-
# Check for unstaged changes.
31-
if ! $(git diff-files --quiet --ignore-submodules --); then
32-
s+='!';
33-
fi;
30+
# Check for unstaged changes.
31+
if ! $(git diff-files --quiet --ignore-submodules --); then
32+
s+='!';
33+
fi;
3434

35-
# Check for untracked files.
36-
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
37-
s+='?';
38-
fi;
35+
# Check for untracked files.
36+
if [ -n "$(git ls-files --others --exclude-standard)" ]; then
37+
s+='?';
38+
fi;
3939

40-
# Check for stashed files.
41-
if $(git rev-parse --verify refs/stash &>/dev/null); then
42-
s+='$';
43-
fi;
40+
# Check for stashed files.
41+
if $(git rev-parse --verify refs/stash &>/dev/null); then
42+
s+='$';
43+
fi;
4444

45-
fi;
45+
fi;
4646

47-
# Get the short symbolic ref.
48-
# If HEAD isn’t a symbolic ref, get the short SHA for the latest commit
49-
# Otherwise, just give up.
50-
branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \
51-
git rev-parse --short HEAD 2> /dev/null || \
52-
echo '(unknown)')";
47+
# Get the short symbolic ref.
48+
# If HEAD isn’t a symbolic ref, get the short SHA for the latest commit
49+
# Otherwise, just give up.
50+
branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \
51+
git rev-parse --short HEAD 2> /dev/null || \
52+
echo '(unknown)')";
5353

54-
[ -n "${s}" ] && s=" [${s}]";
54+
[ -n "${s}" ] && s=" [${s}]";
5555

56-
echo -e "${1}${branchName}${blue}${s}";
57-
else
58-
return;
59-
fi;
56+
echo -e "${1}${branchName}${blue}${s}";
57+
else
58+
return;
59+
fi;
6060
}
6161

6262
if tput setaf 1 &> /dev/null; then
63-
tput sgr0; # reset colors
64-
bold=$(tput bold);
65-
reset=$(tput sgr0);
66-
# Solarized colors, taken from http://git.io/solarized-colors.
67-
black=$(tput setaf 0);
68-
blue=$(tput setaf 33);
69-
cyan=$(tput setaf 37);
70-
green=$(tput setaf 64);
71-
orange=$(tput setaf 166);
72-
purple=$(tput setaf 125);
73-
red=$(tput setaf 124);
74-
violet=$(tput setaf 61);
75-
white=$(tput setaf 15);
76-
yellow=$(tput setaf 136);
63+
tput sgr0; # reset colors
64+
bold=$(tput bold);
65+
reset=$(tput sgr0);
66+
# Solarized colors, taken from http://git.io/solarized-colors.
67+
black=$(tput setaf 0);
68+
blue=$(tput setaf 33);
69+
cyan=$(tput setaf 37);
70+
green=$(tput setaf 64);
71+
orange=$(tput setaf 166);
72+
purple=$(tput setaf 125);
73+
red=$(tput setaf 124);
74+
violet=$(tput setaf 61);
75+
white=$(tput setaf 15);
76+
yellow=$(tput setaf 136);
7777
else
78-
bold='';
79-
reset="\e[0m";
80-
black="\e[1;30m";
81-
blue="\e[1;34m";
82-
cyan="\e[1;36m";
83-
green="\e[1;32m";
84-
orange="\e[1;33m";
85-
purple="\e[1;35m";
86-
red="\e[1;31m";
87-
violet="\e[1;35m";
88-
white="\e[1;37m";
89-
yellow="\e[1;33m";
78+
bold='';
79+
reset="\e[0m";
80+
black="\e[1;30m";
81+
blue="\e[1;34m";
82+
cyan="\e[1;36m";
83+
green="\e[1;32m";
84+
orange="\e[1;33m";
85+
purple="\e[1;35m";
86+
red="\e[1;31m";
87+
violet="\e[1;35m";
88+
white="\e[1;37m";
89+
yellow="\e[1;33m";
9090
fi;
9191

9292
# Highlight the user name when logged in as root.
9393
if [[ "${USER}" == "root" ]]; then
94-
userStyle="${red}";
94+
userStyle="${red}";
9595
else
96-
userStyle="${orange}";
96+
userStyle="${orange}";
9797
fi;
9898

9999
# Highlight the hostname when connected via SSH.
100100
if [[ "${SSH_TTY}" ]]; then
101-
hostStyle="${bold}${red}";
101+
hostStyle="${bold}${red}";
102102
else
103-
hostStyle="${yellow}";
103+
hostStyle="${yellow}";
104104
fi;
105105

106106
# Set the terminal title to the current working directory.

0 commit comments

Comments
 (0)