Permalink
Browse files

Use tabs instead of double-space indents

  • Loading branch information...
1 parent fad9536 commit 6b75bfc425a1db36f83bb7a180fb73694ac3e124 @mathiasbynens committed Dec 28, 2011
Showing with 49 additions and 45 deletions.
  1. +4 −2 .aliases
  2. +1 −1 .bash_profile
  3. +30 −28 .bash_prompt
  4. +8 −8 .functions
  5. +5 −5 .vimrc
  6. +1 −1 bootstrap.sh
View
@@ -12,7 +12,7 @@ alias lsd='ls -l | grep "^d"'
# Always use color output for `ls`
if [[ "$OSTYPE" =~ ^darwin ]]; then
- alias ls="command ls -G"
+ alias ls="command ls -G"
else
alias ls="command ls --color"
export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:'
@@ -82,7 +82,9 @@ alias spoton="sudo mdutil -a -i on"
alias plistbuddy="/usr/libexec/PlistBuddy"
# One of @janmoesen’s ProTip™s
-for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do alias "$method"="lwp-request -m '$method'"; done
+for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
+ alias "$method"="lwp-request -m '$method'"
+done
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
alias stfu="osascript -e 'set volume output muted true'"
View
@@ -1,7 +1,7 @@
# Load ~/.bash_prompt, ~/.exports, ~/.aliases, ~/.functions and ~/.extra
# ~/.extra can be used for settings you don’t want to commit
for file in ~/.{bash_prompt,exports,aliases,functions,extra}; do
- [ -r "$file" ] && source "$file"
+ [ -r "$file" ] && source "$file"
done
unset file
View
@@ -1,43 +1,45 @@
-# @gf3’s Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt"
+# @gf3’s Sexy Bash Prompt, inspired by Extravagant Zsh Prompt
# Shamelessly copied from https://github.com/gf3/dotfiles
-if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then export TERM=gnome-256color
-elif infocmp xterm-256color >/dev/null 2>&1; then export TERM=xterm-256color
+if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
+ export TERM=gnome-256color
+elif infocmp xterm-256color >/dev/null 2>&1; then
+ export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
- tput sgr0
- if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
- MAGENTA=$(tput setaf 9)
- ORANGE=$(tput setaf 172)
- GREEN=$(tput setaf 190)
- PURPLE=$(tput setaf 141)
- WHITE=$(tput setaf 256)
- else
- MAGENTA=$(tput setaf 5)
- ORANGE=$(tput setaf 4)
- GREEN=$(tput setaf 2)
- PURPLE=$(tput setaf 1)
- WHITE=$(tput setaf 7)
- fi
- BOLD=$(tput bold)
- RESET=$(tput sgr0)
+ tput sgr0
+ if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
+ MAGENTA=$(tput setaf 9)
+ ORANGE=$(tput setaf 172)
+ GREEN=$(tput setaf 190)
+ PURPLE=$(tput setaf 141)
+ WHITE=$(tput setaf 256)
+ else
+ MAGENTA=$(tput setaf 5)
+ ORANGE=$(tput setaf 4)
+ GREEN=$(tput setaf 2)
+ PURPLE=$(tput setaf 1)
+ WHITE=$(tput setaf 7)
+ fi
+ BOLD=$(tput bold)
+ RESET=$(tput sgr0)
else
- MAGENTA="\033[1;31m"
- ORANGE="\033[1;33m"
- GREEN="\033[1;32m"
- PURPLE="\033[1;35m"
- WHITE="\033[1;37m"
- BOLD=""
- RESET="\033[m"
+ MAGENTA="\033[1;31m"
+ ORANGE="\033[1;33m"
+ GREEN="\033[1;32m"
+ PURPLE="\033[1;35m"
+ WHITE="\033[1;37m"
+ BOLD=""
+ RESET="\033[m"
fi
function parse_git_dirty() {
- [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
+ [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch() {
- git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
}
PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]"
View
@@ -1,32 +1,32 @@
# Create a new directory and enter it
function md() {
- mkdir -p "$@" && cd "$@"
+ mkdir -p "$@" && cd "$@"
}
# Test if HTTP compression (RFC 2616 + SDCH) is enabled for a given URL.
# Send a fake UA string for sites that sniff it instead of using the Accept-Encoding header. (Looking at you, ajax.googleapis.com!)
function httpcompression() {
- encoding="$(curl -LIs -H 'User-Agent: Mozilla/5 Gecko' -H 'Accept-Encoding: gzip,deflate,compress,sdch' "$1" | grep '^Content-Encoding:')" && echo "$1 is encoded using ${encoding#* }" || echo "$1 is not using any encoding"
+ encoding="$(curl -LIs -H 'User-Agent: Mozilla/5 Gecko' -H 'Accept-Encoding: gzip,deflate,compress,sdch' "$1" | grep '^Content-Encoding:')" && echo "$1 is encoded using ${encoding#* }" || echo "$1 is not using any encoding"
}
# Syntax-highlight JSON files
function json() {
- python -mjson.tool <<< "$*" | pygmentize -l javascript
+ python -mjson.tool <<< "$*" | pygmentize -l javascript
}
# All the dig info
function digga() {
- dig +nocmd "$1" any +multiline +noall +answer
+ dig +nocmd "$1" any +multiline +noall +answer
}
# Escape UTF-8 characters into their 3-byte format
function escape() {
- printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u)
- echo # newline
+ printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u)
+ echo # newline
}
# Decode \x{ABCD}-style Unicode escape sequences
function unidecode() {
- perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
- echo # newline
+ perl -e "binmode(STDOUT, ':utf8'); print \"$@\""
+ echo # newline
}
View
10 .vimrc
@@ -61,10 +61,10 @@ set scrolloff=3
" Strip trailing whitespace (,ss)
function! StripWhitespace ()
- let save_cursor = getpos(".")
- let old_query = getreg('/')
- :%s/\s\+$//e
- call setpos('.', save_cursor)
- call setreg('/', old_query)
+ let save_cursor = getpos(".")
+ let old_query = getreg('/')
+ :%s/\s\+$//e
+ call setpos('.', save_cursor)
+ call setreg('/', old_query)
endfunction
noremap <leader>ss :call StripWhitespace ()<CR>
View
@@ -4,6 +4,6 @@ git pull
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
- rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~
+ rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~
fi
source "$HOME/.bash_profile"

1 comment on commit 6b75bfc

Contributor

Gasp!

Please sign in to comment.