-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to be as shell-agnostic as I can, as I tend to jump between shells.
- Loading branch information
1 parent
436e07d
commit eaf6d9c
Showing
16 changed files
with
266 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# git aliases | ||
alias ga='git add' | ||
alias gai='git add -interactive' | ||
alias gA='git add --all' | ||
alias gbl="git branch --list --verbose" | ||
alias gcb="git checkout -B" | ||
alias gca='git commit --amend' | ||
alias gcl="git clone --progress" | ||
alias gco="git checkout" | ||
alias gcm="git checkout master" | ||
alias gct='git commit' | ||
alias gd="git diff" | ||
alias gitundocommit="git reset --soft 'HEAD^'" | ||
alias gitundopush="git push -f origin 'HEAD^:master'" | ||
alias glo="git log --decorate --oneline --graph" | ||
alias glg="git log --decorate --graph --abbrev-commit --date=relative" | ||
alias gmg='git merge --no-ff' | ||
alias gph="git push" | ||
alias gpr="git pull" | ||
alias gpom="git push origin master" | ||
alias grao="git remote add origin" | ||
alias grau="git remote add upstream" | ||
alias grv="git remote -v" | ||
alias gs="git status --short --branch" | ||
alias gss='git stash save' | ||
alias gsa='git stash apply' | ||
alias gsl='git stash list' | ||
alias gsp='git stash pop' | ||
alias gsc='git stash clear' | ||
alias gsd='git stash drop' | ||
|
||
## Directory nav | ||
alias ..="cd .." | ||
alias mkcd="mkdir -p && cd $_" | ||
alias ls="ls -AFqLG" | ||
|
||
alias sz='source ~/.zshrc' | ||
|
||
# Hiding and showing files in Finder | ||
alias shf="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" | ||
alias hhf="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
if tput setaf 1 &> /dev/null; then | ||
tput sgr0; # reset colors | ||
bold=$(tput bold); | ||
reset=$(tput sgr0); | ||
# Solarized colors, taken from http://git.io/solarized-colors. | ||
black=$(tput setaf 0); | ||
blue=$(tput setaf 33); | ||
cyan=$(tput setaf 37); | ||
green=$(tput setaf 64); | ||
orange=$(tput setaf 166); | ||
purple=$(tput setaf 125); | ||
red=$(tput setaf 124); | ||
violet=$(tput setaf 61); | ||
white=$(tput setaf 15); | ||
yellow=$(tput setaf 136); | ||
else | ||
bold=''; | ||
reset="\e[0m"; | ||
black="\e[1;30m"; | ||
blue="\e[1;34m"; | ||
cyan="\e[1;36m"; | ||
green="\e[1;32m"; | ||
orange="\e[1;33m"; | ||
purple="\e[1;35m"; | ||
red="\e[1;31m"; | ||
violet="\e[1;35m"; | ||
white="\e[1;37m"; | ||
yellow="\e[1;33m"; | ||
fi; | ||
|
||
# Highlight the user name when logged in as root. | ||
if [[ "${USER}" == "root" ]]; then | ||
userStyle="${red}"; | ||
else | ||
userStyle="${orange}"; | ||
fi; | ||
|
||
# Highlight the hostname when connected via SSH. | ||
if [[ "${SSH_TTY}" ]]; then | ||
hostStyle="${bold}${red}"; | ||
else | ||
hostStyle="${yellow}"; | ||
fi; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ -f /etc/bash_completion ] && source /etc/bash_completion | ||
|
||
test -e ${HOME}/.iterm2_shell_integration.bash && source ${HOME}/.iterm2_shell_integration.bash |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
set PROMPT_DIRTRIM=1 | ||
|
||
PS1="\[${bold}${white}\]\n${PROMPT_CHARACTER} \[${reset}\]"; # `$` (and reset color) | ||
export PS1; | ||
|
||
PS2="\[${yellow}\]→ \[${reset}\]"; | ||
export PS2; |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
source ~/.config/env | ||
source $XDG_CONFIG_HOME/aliases | ||
source $XDG_CONFIG_HOME/colors | ||
source $XDG_CONFIG_HOME/extras | ||
source $XDG_CONFIG_HOME/prompt | ||
|
||
source $XDG_CONFIG_HOME/bash/colors.sh | ||
source $XDG_CONFIG_HOME/bash/extras.sh | ||
source $XDG_CONFIG_HOME/bash/prompt.sh | ||
|
||
shopt -s cdspell | ||
shopt -s checkwinsize | ||
shopt -s histappend | ||
shopt -s nocaseglob |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Colors | ||
TERM=xterm-256color | ||
CLICOLOR=1 | ||
LS_COLORS=exfxcxdxbxegedabagacad | ||
|
||
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; |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export EDITOR=vim | ||
export XDG_CONFIG_HOME=~/.config | ||
|
||
export MY_NAME="" | ||
export PRIVATE_NPM_REGISTRY= | ||
export GITHUB_ORG=iot | ||
export WORK_EMAIL_ADDRESS="" | ||
export OPEN_SOURCE_EMAIL_ADDRESS="" | ||
|
||
export GITHUB_TOKEN="" | ||
export SLACK_TOKEN_FOR_TRAVIS="" | ||
export NPM_TOKEN="" | ||
|
||
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin: | ||
|
||
# System | ||
GIT_TERMINAL_PROMPT=1 | ||
LANG=en_US.UTF-8 | ||
USER=kevinSuttle | ||
TERM_PROGRAM=iTerm2.app | ||
|
||
# Actual data for the sensitive values above | ||
if [ -r ~/.private ]; then . ~/.private; fi |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[ -f ~.travis/travis.sh ] && source ~.travis/travis.sh | ||
|
||
if which ruby >/dev/null && which gem >/dev/null; then | ||
PATH="$(ruby -rubygems -e 'puts Gem.user_dir')/bin:$PATH" | ||
fi | ||
|
||
eval "$(rbenv init -)" |
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
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Prompt settings # Alternatives starting at column 40 | ||
PROMPT_CHARACTER="⬡ " # ❯ ∠ ⋔ 🝓 | ||
|
||
PROMPT_PROMPT_ON_NEWLINE=false | ||
# PROMPT_MULTILINE_FIRST_PREFIX="\n\r" | ||
# PROMPT_MULTILINE_SECOND_PROMPT_PREFIX=${PROMPT_CHARACTER} | ||
PROMPT_CARRIAGE_RETURN_ICON="↵" | ||
|
||
PROMPT_LEFT_SEGMENT_SEPARATOR="" | ||
PROMPT_LEFT_SUBSEGMENT_SEPARATOR="" | ||
PROMPT_RIGHT_SEGMENT_SEPARATOR="⎪" | ||
PROMPT_RIGHT_SUBSEGMENT_SEPARATOR="⎪" | ||
|
||
PROMPT_FAIL_ICON="✕" | ||
PROMPT_STATUS_VERBOSE=false | ||
PROMPT_STATUS_BACKGROUND='red' | ||
PROMPT_STATUS_FOREGROUND='white' | ||
PROMPT_STATUS_ERROR_FOREGROUND='white' | ||
PROMPT_STATUS_ERROR_BACKGROUND='red' | ||
|
||
# PROMPT_GIT_ICON="⋋ " | ||
PROMPT_GIT_ICON="" | ||
PROMPT_OUTGOING_CHANGES_ICON="\U21E1" # ↥ ⊷ ↗ \U234F | ||
PROMPT_INCOMING_CHANGES_ICON="\U21E3" # ↧ ⊶ ↙ \U2356 ⎌ | ||
PROMPT_TAG_ICON="\UF092 " | ||
PROMPT_COMMIT_ICON="\UF03C " | ||
PROMPT_BOOKMARK_ICON="\U1F516 " | ||
|
||
# PROMPT_GIT_HIDE_BRANCH_ICON=false | ||
# PROMPT_GIT_REMOTE_BRANCH_ICON="⑂ " | ||
|
||
PROMPT_GIT_BRANCH_ICON="" # 🝓 ⤚ | ||
PROMPT_GIT_HIDE_BRANCH_ICON=true | ||
PROMPT_GIT_STAGED_ICON="" # ⊕ | ||
PROMPT_GIT_UNSTAGED_ICON="" # ⊙ | ||
PROMPT_GIT_UNTRACKED_ICON="" # ⚐ | ||
PROMPT_GIT_HIDE_STASH_ICON=true | ||
PROMPT_GIT_STASH_ICON="" # ⎆ | ||
|
||
# Advanced color customization | ||
PROMPT_FOREGROUND='black' | ||
PROMPT_DARK_FOREGROUND='green' | ||
PROMPT_BACKGROUND='green' | ||
|
||
# If changes are detected: | ||
PROMPT_MODIFIED_FOREGROUND='black' | ||
PROMPT_MODIFIED_BACKGROUND='white' | ||
|
||
PROMPT_TIME_FOREGROUND='black' | ||
PROMPT_TIME_BACKGROUND='magenta' | ||
|
||
PROMPT_BATTERY_ICON="\U26A1" | ||
PROMPT_BATTERY_CHARGING_FOREGROUND="black" | ||
PROMPT_BATTERY_CHARGING_BACKGROUND="yellow" | ||
PROMPT_BATTERY_CHARGED_FOREGROUND="white" | ||
PROMPT_BATTERY_CHARGED_BACKGROUND="green" | ||
PROMPT_BATTERY_DISCONNECTED=$DEFAULT_COLOR | ||
PROMPT_BATTERY_LOW_FOREGROUND="white" | ||
PROMPT_BATTERY_LOW_BACKGROUND="red" | ||
PROMPT_BATTERY_LOW_THRESHOLD=15 | ||
|
||
PROMPT_LEFT_ELEMENTS=(status dir) | ||
PROMPT_TIME_FORMAT="%D{%m/%d/%y %H:%M:%S}" | ||
PROMPT_RIGHT_ELEMENTS=(time battery) |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Colors | ||
autoload colors; colors | ||
|
||
# The variables are wrapped in \%\{\%\}. This should be the case for every | ||
# variable that does not contain space. | ||
for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do | ||
eval PR_$COLOR='%{$fg_no_bold[${(L)COLOR}]%}' | ||
eval PR_BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' | ||
done | ||
|
||
eval RESET='$reset_color' | ||
export PR_RED PR_GREEN PR_YELLOW PR_BLUE PR_WHITE PR_BLACK | ||
export PR_BOLD_RED PR_BOLD_GREEN PR_BOLD_YELLOW PR_BOLD_BLUE | ||
export PR_BOLD_WHITE PR_BOLD_BLACK | ||
|
||
unset LSCOLORS |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh | ||
|
||
# brew info zsh-syntax-highlighting | ||
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
autoload -U promptinit && promptinit | ||
|
||
PURE_PROMPT_SYMBOL=${PROMPT_CHARACTER} | ||
PURE_GIT_DOWN_ARROW=${PROMPT_INCOMING_CHANGES_ICON} | ||
PURE_GIT_UP_ARROW=${PROMPT_OUTGOING_CHANGES_ICON} | ||
|
||
prompt pure |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
source ~/.config/env | ||
source $XDG_CONFIG_HOME/aliases | ||
source $XDG_CONFIG_HOME/colors | ||
source $XDG_CONFIG_HOME/extras | ||
source $XDG_CONFIG_HOME/prompt | ||
|
||
source $XDG_CONFIG_HOME/zsh/colors.zsh | ||
source $XDG_CONFIG_HOME/zsh/extras.zsh | ||
source $XDG_CONFIG_HOME/zsh/prompt.zsh | ||
|
||
HISTFILE=~/.histfile | ||
HISTSIZE=100 | ||
SAVEHIST=100000 | ||
setopt appendhistory autocd extendedglob | ||
unsetopt beep | ||
bindkey -v | ||
|
||
# zsh autocomplete | ||
zstyle :compinstall filename '~/.zshrc' | ||
zstyle ':completion:*' rehash true | ||
|
||
autoload -Uz compinit | ||
compinit |