+++ /dev/null
-# ls with coloring
-lsflags="-hF"
-
-# Detect which `ls` flavor is in use
-if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
- colorflag="--color=auto"
- lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"
-else # OS X `ls`
- export CLICOLOR=1
- colorflag="-G"
-fi
-
-alias ls="ls $colorflag $lsflags"
-alias sl=ls
-alias la='ls -A'
-alias ll='ls -l'
-alias l1='ls -1'
-alias l.='ls -d .[a-z]*'
-
-# grep and less with coloring
-alias grep='grep --color=auto'
-alias egrep='egrep --color=auto'
-alias fgrep='fgrep --color=auto'
-alias less='less -m -N -g -i -J --underline-special --SILENT -X'
-alias more='less'
-
-# Secure settings
-alias rm='rm -i'
-alias cp='cp -i'
-alias mv='mv -i'
-alias md='mkdir -p'
-alias rd='rmdir'
-
-# My shortcuts
-alias h='history'
-alias info='info --vi-keys'
-alias open='xdg-open &>/dev/null'
-alias dit='git --git-dir=$HOME/.dit --work-tree=$HOME'
-alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores'
-alias rg='rg --path-separator="//"'
-
-if [ ! -x "$(which tree 2>/dev/null)" ]
-then
- alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
-fi
-
-# Enable aliases to be sudo'ed
-alias sudo='sudo '
-
-# Get week number
-alias week='date +%V'
-
-# Stopwatch
-alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
-
-# make date folders
-alias mkdate='mkdir "$(date +'%Y%m%d')"'
-
-# Automatically change the directory in bash after closing ranger
-function ranger-cd {
- tempfile="$(mktemp -t tmp.XXXXXX)"
-# /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
- ~/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
- test -f "$tempfile" &&
- if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
- cd -- "$(cat "$tempfile")"
- fi
- rm -f -- "$tempfile"
-}
-
-# This binds Ctrl-O to ranger-cd:
-bind '"\C-o":"ranger-cd\C-m"'
-alias r='ranger-cd'
--- /dev/null
+# ls with coloring
+lsflags="-hF"
+
+# Detect which `ls` flavor is in use
+if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
+ colorflag="--color=auto"
+ lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"
+else # OS X `ls`
+ export CLICOLOR=1
+ colorflag="-G"
+fi
+
+alias ls="ls $colorflag $lsflags"
+alias sl=ls
+alias la='ls -A'
+alias ll='ls -l'
+alias l1='ls -1'
+alias l.='ls -d .[a-z]*'
+
+# grep and less with coloring
+alias grep='grep --color=auto'
+alias egrep='egrep --color=auto'
+alias fgrep='fgrep --color=auto'
+alias less='less -m -N -g -i -J --underline-special --SILENT -X'
+alias more='less'
+
+# Secure settings
+alias rm='rm -i'
+alias cp='cp -i'
+alias mv='mv -i'
+alias md='mkdir -p'
+alias rd='rmdir'
+
+# My shortcuts
+alias h='history'
+alias q='exit'
+alias info='info --vi-keys'
+alias open='xdg-open &>/dev/null'
+alias dit='git --git-dir=$HOME/.dit --work-tree=$HOME'
+alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores'
+alias rg='rg --path-separator="//"'
+
+if [ ! -x "$(which tree 2>/dev/null)" ]
+then
+ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
+fi
+
+# Enable aliases to be sudo'ed
+alias sudo='sudo '
+
+# Get week number
+alias week='date +%V'
+
+# Make directory named todays date
+alias mkdate='mkdir "$(date +'%Y%m%d')"'
+
+# Stopwatch
+alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
+
+
+# Automatically change the directory in bash after closing ranger
+function ranger-cd {
+ tempfile="$(mktemp -t tmp.XXXXXX)"
+ ~/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
+ test -f "$tempfile" &&
+ if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
+ cd -- "$(cat "$tempfile")"
+ fi
+ rm -f -- "$tempfile"
+}
+
+# This binds Ctrl-O to ranger-cd:
+bind '"\C-o":"ranger-cd\C-m"'
+alias r='ranger-cd'
+++ /dev/null
-# Add tab completion for many Bash commands
-[ -f /etc/bash_completion ] && . /etc/bash_completion
-
-# Enable tab completion for `dit` by marking it as an alias for `git`
-if type _git &> /dev/null; then
- complete -o default -o nospace -F _git dit;
-fi;
-
-# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
-if [ -e "$HOME/.ssh/config" ]; then
- complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh;
-fi;
--- /dev/null
+# Add tab completion for many Bash commands
+[ -f /etc/bash_completion ] && . /etc/bash_completion
+
+# Enable tab completion for `dit` by marking it as an alias for `git`
+if type _git &> /dev/null; then
+ complete -o default -o nospace -F _git dit;
+fi;
+
+# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
+if [ -e "$HOME/.ssh/config" ]; then
+ complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh;
+fi;
+++ /dev/null
-# Case-insensitive globbing (used in pathname expansion)
-shopt -s nocaseglob
-
-# Append to the Bash history file, rather than overwriting it
-shopt -s histappend
-
-# Autocorrect typos in path names when using `cd`
-shopt -s cdspell
-
-# Enable some Bash 4 features when possible:
-# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
-# * Recursive globbing, e.g. `echo **/*.txt`
-for option in autocd globstar; do
- shopt -s "$option" 2> /dev/null;
-done;
-
-# Don't use ^D to exit
-set -o ignoreeof
-set -o vi
-
--- /dev/null
+# Case-insensitive globbing (used in pathname expansion)
+shopt -s nocaseglob
+
+# Append to the Bash history file, rather than overwriting it
+shopt -s histappend
+
+# Autocorrect typos in path names when using `cd`
+shopt -s cdspell
+
+# Enable some Bash 4 features when possible:
+# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
+# * Recursive globbing, e.g. `echo **/*.txt`
+for option in autocd globstar; do
+ shopt -s "$option" 2> /dev/null;
+done;
+
+# Don't use ^D to exit
+set -o ignoreeof
+set -o vi
+