forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit drops some aliases, functions, and settings from the project that I wasn’t using at all. It also cleans up some of the remaining code.
- Loading branch information
1 parent
e030845
commit 3b4eb3e
Showing
9 changed files
with
218 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
# Add `~/bin` to the `$PATH` | ||
export PATH="$HOME/bin:$PATH" | ||
export PATH="$HOME/bin:$PATH"; | ||
|
||
# Load the shell dotfiles, and then some: | ||
# * ~/.path can be used to extend `$PATH`. | ||
# * ~/.extra can be used for other settings you don’t want to commit. | ||
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do | ||
[ -r "$file" ] && [ -f "$file" ] && source "$file" | ||
done | ||
unset file | ||
[ -r "$file" ] && [ -f "$file" ] && source "$file"; | ||
done; | ||
unset file; | ||
|
||
# Case-insensitive globbing (used in pathname expansion) | ||
shopt -s nocaseglob | ||
shopt -s nocaseglob; | ||
|
||
# Append to the Bash history file, rather than overwriting it | ||
shopt -s histappend | ||
shopt -s histappend; | ||
|
||
# Autocorrect typos in path names when using `cd` | ||
shopt -s cdspell | ||
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 | ||
shopt -s "$option" 2> /dev/null; | ||
done; | ||
|
||
# Add tab completion for many Bash commands | ||
if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then | ||
source "$(brew --prefix)/etc/bash_completion" | ||
fi | ||
source "$(brew --prefix)/etc/bash_completion"; | ||
fi; | ||
|
||
# Enable tab completion for `g` by marking it as an alias for `git` | ||
if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then | ||
complete -o default -o nospace -F _git g | ||
fi | ||
complete -o default -o nospace -F _git g; | ||
fi; | ||
|
||
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards | ||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh | ||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2 | tr ' ' '\n')" scp sftp ssh; | ||
|
||
# Add tab completion for `defaults read|write NSGlobalDomain` | ||
# You could just use `-g` instead, but I like being explicit | ||
complete -W "NSGlobalDomain" defaults | ||
complete -W "NSGlobalDomain" defaults; | ||
|
||
# Add `killall` tab completion for common apps | ||
complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall | ||
complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[ -n "$PS1" ] && source ~/.bash_profile | ||
[ -n "$PS1" ] && source ~/.bash_profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# Make vim the default editor | ||
export EDITOR="vim" | ||
export EDITOR="vim"; | ||
|
||
# Larger bash history (allow 32³ entries; default is 500) | ||
export HISTSIZE=32768 | ||
export HISTFILESIZE=$HISTSIZE | ||
export HISTCONTROL=ignoredups | ||
export HISTSIZE=32768; | ||
export HISTFILESIZE=$HISTSIZE; | ||
export HISTCONTROL=ignoredups; | ||
# Make some commands not show up in history | ||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help" | ||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"; | ||
|
||
# Prefer US English and use UTF-8 | ||
export LANG="en_US.UTF-8" | ||
export LC_ALL="en_US.UTF-8" | ||
export LANG="en_US.UTF-8"; | ||
export LC_ALL="en_US.UTF-8"; | ||
|
||
# Highlight section titles in manual pages | ||
export LESS_TERMCAP_md="$ORANGE" | ||
export LESS_TERMCAP_md="${ORANGE}"; | ||
|
||
# Don’t clear the screen after quitting a manual page | ||
export MANPAGER="less -X" | ||
export MANPAGER="less -X"; | ||
|
||
# Always enable colored `grep` output | ||
export GREP_OPTIONS="--color=auto" | ||
export GREP_OPTIONS="--color=auto"; | ||
|
||
# Link Homebrew casks in `/Applications` rather than `~/Applications` | ||
export HOMEBREW_CASK_OPTS="--appdir=/Applications" | ||
export HOMEBREW_CASK_OPTS="--appdir=/Applications"; |
Oops, something went wrong.