Last active
February 18, 2020 11:41
-
-
Save jhenkens/11106169 to your computer and use it in GitHub Desktop.
My terminal config files
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
alias ll='ls -l' | |
alias la='ls -la' | |
alias lr='ls -lR' | |
alias l='ls -CF' | |
alias g='git' | |
alias pyhttp='python -m "SimpleHTTPServer"' | |
alias railsdevclone='git clone [email protected]:jhenkens/vagrant-ruby-rvm.git' |
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
PLATFORM='unknown' | |
unamestr=`uname -s` | |
if [[ "$unamestr" == 'Linux' ]]; then PLATFORM='linux' | |
EGREP=/bin/egrep | |
SED=/bin/sed | |
elif [[ "$unamestr" == 'Darwin' ]]; then PLATFORM='osx' | |
EGREP=/usr/bin/egrep | |
SED=/usr/bin/sed | |
fi | |
export DROPBOXCONFIGDIR=$HOME/Dropbox/ConfigFiles | |
export PYTHONSTARTUP=$DROPBOXCONFIGDIR/.pythonrc.py | |
set -o vi | |
shopt -s histappend | |
export EDITOR=vim | |
export VISUAL=vim | |
umask 0077 | |
function pathmunge () { | |
if ! echo $PATH | $EGREP -q "(^|:)$1($|:)" ; then | |
if [ -d "$newPath" ] ; then | |
if [ "$2" = "after" ] ; then | |
PATH=$PATH:$1 | |
else | |
PATH=$1:$PATH | |
fi | |
fi | |
fi | |
} | |
function removePath () { | |
PATH=`echo $PATH | $SED -e "s|^$1$||" -e "s|^$1:||" -e "s|:$1$||" -e "s|:$1:|:|"` | |
} | |
function addtopath() { | |
args=("$@") | |
for((i=0; i< $#; i++)) { | |
newPath="${args[$i]}" | |
while [[ :"$PATH": == *:"$newPath":* ]]; do | |
removePath "$newPath" | |
done | |
AFTER="" | |
if [[ "$newPath" == -* ]] ; then | |
AFTER="after" | |
fi | |
pathmunge "$newPath" "$AFTER" | |
} | |
} | |
addtopath "$HOME/bin" "/usr/local/bin" "/usr/local/sbin" "/sbin" "/usr/sbin" "$HOME/.rvm/bin" "-/usr/local/heroku/bin" | |
if [[ $PLATFORM == 'osx' ]]; then | |
if [ -f $DROPBOXCONFIGDIR/.bash_profile_osx ]; then | |
. $DROPBOXCONFIGDIR/.bash_profile_osx | |
fi | |
elif [[ $PLATFORM == 'linux' ]]; then | |
if [ -f $DROPBOXCONFIGDIR/.bash_profile_linux ]; then | |
. $DROPBOXCONFIGDIR/.bash_profile_linux | |
fi | |
fi | |
if [ -f $HOME/.profile ]; then | |
. $HOME/.profile | |
fi | |
if [ -f $DROPBOXCONFIGDIR/.nova_setup ]; then | |
. $DROPBOXCONFIGDIR/.nova_setup | |
fi | |
if [ -f $DROPBOXCONFIGDIR/.bash_aliases ]; then | |
. $DROPBOXCONFIGDIR/.bash_aliases | |
fi | |
unset -f addtopath | |
unset -f removePath | |
function dts() { date +%Y-%m-%d-%H-%M-%S; } | |
shopt -s dotglob; for f in $DROPBOXCONFIFGDIR/*; do if test -d "$f"; then if test -d "$f/$(basename $f)"; then echo "Found recursive dir in configs: $f"; fi; fi; done; shopt -u dotglob | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
PS1='\[\e[01;32m\]\u\[\e[01;34m\]@\[\e[01;35m\]\h \[\e[0;32m\]$(declare -F __git_ps1 &>/dev/null && __git_ps1 "%s\[\e[33m\]:")\[\e[0;34m\]\W\[\e[00m\] $ ' |
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
if [ -f /etc/debian_version ]; then | |
if [ -f $DROPBOXCONFIGDIR/.bashrc_debian ]; then | |
. $DROPBOXCONFIGDIR/.bashrc_debian | |
fi | |
fi | |
addtopath $HOME/bin/linux | |
shopt -s globstar | |
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
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH | |
#export VAGRANT_VMWARE_CLONE_DIRECTORY="$HOME/VMWare Vagrant VMs" | |
#export VAGRANT_DEFAULT_PROVIDER=vmware_fusion | |
addtopath $HOME/bin/osx "/Applications/VMware Fusion.app/Contents/Library" "/Applications/Postgres.app/Contents/Versions/9.3/bin" "/usr/local/Cellar/node/0.10.28/libexec/npm/bin" | |
alias timeout='gtimeout' | |
alias beep='tput bel' | |
export PGHOST=localhost | |
export NVM_DIR=~/.nvm | |
source $DROPBOXCONFIGDIR/iterm2_helpers.sh | |
source $DROPBOXCONFIGDIR/.bash_secrets_osx | |
if which brew > /dev/null; then | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
if [ -f $DROPBOXCONFIGDIR/rakecomplete ]; then | |
. $DROPBOXCONFIGDIR/rakecomplete | |
fi | |
fi | |
if [ -f $(brew --prefix nvm)/nvm.sh ]; then | |
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion | |
source $(brew --prefix nvm)/nvm.sh | |
fi | |
fi | |
if [ -e /usr/share/terminfo/x/xterm-256color ]; then | |
export TERM='xterm-256color' | |
else | |
export TERM='xterm-color' | |
fi | |
__git_complete g __git_main |
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 TAKEN FROM DEBIAN WHEEZY | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# don't overwrite GNU Midnight Commander's setting of `ignorespace'. | |
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups | |
# ... or force ignoredups and ignorespace | |
HISTCONTROL=ignoreboth | |
# append to the history file, don't overwrite it | |
shopt -s histappend | |
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# make less more friendly for non-text input files, see lesspipe(1) | |
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in | |
xterm-color) color_prompt=yes;; | |
esac | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
force_color_prompt=yes | |
if [ -n "$force_color_prompt" ]; then | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
# We have color support; assume it's compliant with Ecma-48 | |
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such | |
# a case would tend to support setf rather than setaf.) | |
color_prompt=yes | |
else | |
color_prompt= | |
fi | |
fi | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
unset color_prompt force_color_prompt | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |
;; | |
*) | |
;; | |
esac | |
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
#alias grep='grep --color=auto' | |
#alias fgrep='fgrep --color=auto' | |
#alias egrep='egrep --color=auto' | |
fi | |
# some more ls aliases | |
alias ll='ls -l' | |
alias la='ls -la' | |
#alias l='ls -CF' | |
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them here directly. | |
# See /usr/share/doc/bash-doc/examples in the bash-doc package. | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
# enable programmable completion features (you don't need to enable | |
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
# sources /etc/bash.bashrc). | |
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then | |
. /etc/bash_completion | |
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
install: --no-rdoc --no-ri | |
update: --no-rdoc --no-ri |
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
[user] | |
[push] | |
default = simple | |
[filter "media"] | |
clean = git-media-clean %f | |
smudge = git-media-smudge %f | |
[github] | |
[color] | |
ui = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[merge] | |
summary=true | |
[alias] | |
a = add # add | |
chunkyadd = add --patch # stage commits chunk by chunk | |
# branch | |
b = branch -v # branch (verbose) | |
# commit | |
c = commit -m # commit with message | |
ca = commit -am # commit all with message | |
ci = commit # commit | |
amend = commit --amend # ammend your last commit | |
ammend = commit --amend # ammend your last commit | |
# checkout | |
co = checkout # checkout | |
nb = checkout -b # create and switch to a new branch (mnemonic: "git new branch branchname...") | |
# cherry-pick | |
cp = cherry-pick -x # grab a change from a branch | |
# diff | |
d = diff # diff unstaged changes | |
dc = diff --cached # diff staged changes | |
last = diff HEAD^ # diff last committed change | |
# log | |
l = log --graph --date=short | |
changes = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" --name-status | |
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" -n10 | |
sl = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\" -n10 | |
changelog = log --pretty=format:\" * %s\" | |
shortnocolor = log --pretty=format:\"%h %cr %cn %s\" | |
graph = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all | |
# merge | |
ff = merge --ff-only | |
# pull | |
pl = pull # pull | |
# push | |
ps = push # push | |
# rebase | |
rc = rebase --continue # continue rebase | |
rs = rebase --skip # skip rebase | |
# remote | |
r = remote -v # show remotes (verbose) | |
# reset | |
unstage = reset HEAD # remove files from index (tracking) | |
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state | |
filelog = log -u # show changes to a file | |
# status | |
s = status # status | |
st = status # status | |
stat = status # status | |
# tag | |
t = tag -n # show tags with <n> lines of each tag message | |
[credential] | |
helper = osxkeychain | |
[core] | |
autocrlf = input | |
[mergetool] | |
keepBackup = true |
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
set completion-ignore-case On | |
set bell-style none | |
set editing-mode vi | |
$if mode=vi | |
set keymap vi-command | |
"gg": beginning-of-history | |
"G": end-of-history | |
set keymap vi-insert | |
"jj": vi-movement-mode | |
"\C-p": history-search-backward |
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
Some of these are copied from elsewhere, some of these are made by me. | |
Maybe I'll eventually add my ~/bin scripts to Gist as well, but I | |
figured I may as well put these up for versioning and as a reference | |
to the internet. |
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
try: | |
import readline | |
except ImportError: | |
print("Module readline not available.") | |
else: | |
import rlcompleter | |
if 'libedit' in readline.__doc__: | |
readline.parse_and_bind("bind -e") | |
readline.parse_and_bind("bind '\t' rl_complete") | |
else: | |
readline.parse_and_bind("tab: complete") | |
### Indenting | |
class TabCompleter(rlcompleter.Completer): | |
"""Completer that supports indenting""" | |
def complete(self, text, state): | |
if not text: | |
return (' ', None)[state] | |
else: | |
return rlcompleter.Completer.complete(self, text, state) | |
readline.set_completer(TabCompleter().complete) | |
print ("Loaded!") | |
### Add autocompletion | |
### Add history | |
import os | |
histfile = os.path.join(os.environ["HOME"], ".pyhist") | |
try: | |
readline.read_history_file(histfile) | |
except IOError: | |
pass | |
import atexit | |
atexit.register(readline.write_history_file, histfile) | |
del histfile |
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
softTabs = true |
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
" Vundle settings: | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" Init Bundles | |
Bundle 'gmarik/vundle' | |
Bundle 'jhenkens/vim-colors-solarized' | |
Bundle 'airblade/vim-gitgutter' | |
Bundle 'mattn/gist-vim' | |
Bundle 'tpope/vim-rails' | |
Bundle 'mattn/webapi-vim' | |
Bundle 'plasticboy/vim-markdown' | |
Bundle 'tpope/vim-unimpaired' | |
" Remember, type BundleInstall the first time you run vim! | |
" Done setting up vundle and bundles, we can now do what we want | |
set smartindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set visualbell | |
syntax on | |
" highlight tabs and trailing spaces | |
set listchars=tab:>-,trail:- | |
set list | |
set number | |
" allow backspacing over everything in insert mode | |
set bs=2 | |
" disable backup file | |
set nobackup | |
" put swap files in common location | |
set dir=~/.vimswp// | |
set hlsearch | |
" if has('gui_running') | |
" set background=light | |
" else | |
" set background=dark | |
" endif | |
cmap Wsudo w !sudo tee % >/dev/null<CR> | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
nnoremap <F3> :set hlsearch!<CR> | |
filetype plugin indent on | |
highlight clear SignColumn | |
highlight clear LineNr | |
set foldnestmax=2 | |
nnoremap <space> za | |
vnoremap <space> zf | |
set ignorecase | |
set smartcase | |
if has("unix") | |
let s:uname = system("uname -s") | |
if s:uname == "Darwin" | |
" Do Mac stuff here | |
elseif s:uname == "Linux" | |
" Do Linux Stuff here | |
endif | |
endif |
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
# Usage: | |
# Source this script from your Bash start-up script (eg. ~/.bashrc, ~/.bash_profile). | |
# | |
# Setting titles: | |
# title something | |
# title "more than 1 word" | |
# | |
# Setting tab colors: | |
# tab_color 195 89 76 | |
# tab_color 219 154 88 | |
# tab_color 145 185 104 | |
# tab_color 92 155 204 | |
# | |
# Setting pre-defined tab colors with titles: | |
# tab_red "Rails Server" | |
# tab_orange "Rails Console" | |
# tab_blue "SQL Dev" | |
# tab_green "Tests" | |
title_help0() | |
{ | |
echo "ERROR: No argument provided." | |
echo "Usage:" | |
echo " `basename $0` \"title\" to provide a new Terminal title." | |
} | |
title_help2() | |
{ | |
echo "ERROR: Too many arguments provided." | |
echo "Usage:" | |
echo " `basename $0` \"title\" to provide a new Terminal title." | |
} | |
function set_iterm_title() { | |
if [ $# -eq 0 ] | |
then | |
title_help0; | |
elif [ $# -eq 1 ] | |
then | |
echo -ne "\033]0;$1\007" | |
elif [ $# -gt 1 ] | |
then | |
title_help2; | |
fi | |
} | |
alias title='set_iterm_title' | |
function titlepwd() { | |
set_terminal_title `pwd` | |
} | |
function tab_maroon { title "$1"; tab_color 128 0 0; } | |
function tab_dark_red { title "$1"; tab_color 139 0 0; } | |
function tab_brown { title "$1"; tab_color 165 42 42; } | |
function tab_firebrick { title "$1"; tab_color 178 34 34; } | |
function tab_crimson { title "$1"; tab_color 220 20 60; } | |
function tab_tomato { title "$1"; tab_color 255 99 71; } | |
function tab_coral { title "$1"; tab_color 255 127 80; } | |
function tab_indian_red { title "$1"; tab_color 205 92 92; } | |
function tab_light_coral { title "$1"; tab_color 240 128 128; } | |
function tab_dark_salmon { title "$1"; tab_color 233 150 122; } | |
function tab_salmon { title "$1"; tab_color 250 128 114; } | |
function tab_light_salmon { title "$1"; tab_color 255 160 122; } | |
function tab_orange_red { title "$1"; tab_color 255 69 0; } | |
function tab_dark_orange { title "$1"; tab_color 255 140 0; } | |
function tab_gold { title "$1"; tab_color 255 215 0; } | |
function tab_dark_golden_rod { title "$1"; tab_color 184 134 11; } | |
function tab_golden_rod { title "$1"; tab_color 218 165 32; } | |
function tab_pale_golden_rod { title "$1"; tab_color 238 232 170; } | |
function tab_dark_khaki { title "$1"; tab_color 189 183 107; } | |
function tab_khaki { title "$1"; tab_color 240 230 140; } | |
function tab_olive { title "$1"; tab_color 128 128 0; } | |
function tab_yellow_green { title "$1"; tab_color 154 205 50; } | |
function tab_dark_olive_green { title "$1"; tab_color 85 107 47; } | |
function tab_olive_drab { title "$1"; tab_color 107 142 35; } | |
function tab_lawn_green { title "$1"; tab_color 124 252 0; } | |
function tab_chart_reuse { title "$1"; tab_color 127 255 0; } | |
function tab_green_yellow { title "$1"; tab_color 173 255 47; } | |
function tab_dark_green { title "$1"; tab_color 0 100 0; } | |
function tab_forest_green { title "$1"; tab_color 34 139 34; } | |
function tab_lime { title "$1"; tab_color 0 255 0; } | |
function tab_lime_green { title "$1"; tab_color 50 205 50; } | |
function tab_light_green { title "$1"; tab_color 144 238 144; } | |
function tab_pale_green { title "$1"; tab_color 152 251 152; } | |
function tab_dark_sea_green { title "$1"; tab_color 143 188 143; } | |
function tab_medium_spring_green { title "$1"; tab_color 0 250 154; } | |
function tab_spring_green { title "$1"; tab_color 0 255 127; } | |
function tab_sea_green { title "$1"; tab_color 46 139 87; } | |
function tab_medium_aqua_marine { title "$1"; tab_color 102 205 170; } | |
function tab_medium_sea_green { title "$1"; tab_color 60 179 113; } | |
function tab_light_sea_green { title "$1"; tab_color 32 178 170; } | |
function tab_dark_slate_gray { title "$1"; tab_color 47 79 79; } | |
function tab_teal { title "$1"; tab_color 0 128 128; } | |
function tab_dark_cyan { title "$1"; tab_color 0 139 139; } | |
function tab_aqua { title "$1"; tab_color 0 255 255; } | |
function tab_cyan { title "$1"; tab_color 0 255 255; } | |
function tab_light_cyan { title "$1"; tab_color 224 255 255; } | |
function tab_dark_turquoise { title "$1"; tab_color 0 206 209; } | |
function tab_turquoise { title "$1"; tab_color 64 224 208; } | |
function tab_medium_turquoise { title "$1"; tab_color 72 209 204; } | |
function tab_pale_turquoise { title "$1"; tab_color 175 238 238; } | |
function tab_aqua_marine { title "$1"; tab_color 127 255 212; } | |
function tab_powder_blue { title "$1"; tab_color 176 224 230; } | |
function tab_cadet_blue { title "$1"; tab_color 95 158 160; } | |
function tab_steel_blue { title "$1"; tab_color 70 130 180; } | |
function tab_corn_flower_blue { title "$1"; tab_color 100 149 237; } | |
function tab_deep_sky_blue { title "$1"; tab_color 0 191 255; } | |
function tab_dodger_blue { title "$1"; tab_color 30 144 255; } | |
function tab_light_blue { title "$1"; tab_color 173 216 230; } | |
function tab_sky_blue { title "$1"; tab_color 135 206 235; } | |
function tab_light_sky_blue { title "$1"; tab_color 135 206 250; } | |
function tab_midnight_blue { title "$1"; tab_color 25 25_ 112; } | |
function tab_navy { title "$1"; tab_color 0 0 128; } | |
function tab_dark_blue { title "$1"; tab_color 0 0 139; } | |
function tab_medium_blue { title "$1"; tab_color 0 0 205; } | |
function tab_royal_blue { title "$1"; tab_color 65 105 225; } | |
function tab_blue_violet { title "$1"; tab_color 138 43 226; } | |
function tab_indigo { title "$1"; tab_color 75 0 130; } | |
function tab_dark_slate_blue { title "$1"; tab_color 72 61 139; } | |
function tab_slate_blue { title "$1"; tab_color 106 90 205; } | |
function tab_medium_slate_blue { title "$1"; tab_color 123 104 238; } | |
function tab_medium_purple { title "$1"; tab_color 147 112 219; } | |
function tab_dark_magenta { title "$1"; tab_color 139 0 139; } | |
function tab_dark_violet { title "$1"; tab_color 148 0 211; } | |
function tab_dark_orchid { title "$1"; tab_color 153 50 204; } | |
function tab_medium_orchid { title "$1"; tab_color 186 85_ 211; } | |
function tab_purple { title "$1"; tab_color 128 0 128; } | |
function tab_thistle { title "$1"; tab_color 216 191 216; } | |
function tab_plum { title "$1"; tab_color 221 160 221; } | |
function tab_violet { title "$1"; tab_color 238 130 238; } | |
function tab_magenta_fuchsia { title "$1"; tab_color 255 0 255; } | |
function tab_orchid { title "$1"; tab_color 218 112 214; } | |
function tab_medium_violet_red { title "$1"; tab_color 199 21 133; } | |
function tab_pale_violet_red { title "$1"; tab_color 219 112 147; } | |
function tab_deep_pink { title "$1"; tab_color 255 20 147; } | |
function tab_hot_pink { title "$1"; tab_color 255 105 180; } | |
function tab_light_pink { title "$1"; tab_color 255 182 193; } | |
function tab_pink { title "$1"; tab_color 255 192 203; } | |
function tab_antique_white { title "$1"; tab_color 250 235 215; } | |
function tab_beige { title "$1"; tab_color 245 245 220; } | |
function tab_bisque { title "$1"; tab_color 255 228 196; } | |
function tab_blanched_almond { title "$1"; tab_color 255 235 205; } | |
function tab_wheat { title "$1"; tab_color 245 222 179; } | |
function tab_corn_silk { title "$1"; tab_color 255 248 220; } | |
function tab_lemon_chiffon { title "$1"; tab_color 255 250 205; } | |
function tab_light_golden_rod_yellow { title "$1"; tab_color 250 250 210; } | |
function tab_light_yellow { title "$1"; tab_color 255 255 224; } | |
function tab_saddle_brown { title "$1"; tab_color 139 69 19; } | |
function tab_sienna { title "$1"; tab_color 160 82 45; } | |
function tab_chocolate { title "$1"; tab_color 210 105 30; } | |
function tab_peru { title "$1"; tab_color 205 133 63; } | |
function tab_sandy_brown { title "$1"; tab_color 244 164 96; } | |
function tab_burly_wood { title "$1"; tab_color 222 184 135; } | |
function tab_tan { title "$1"; tab_color 210 180 140; } | |
function tab_rosy_brown { title "$1"; tab_color 188 143 143; } | |
function tab_moccasin { title "$1"; tab_color 255 228 181; } | |
function tab_navajo_white { title "$1"; tab_color 255 222 173; } | |
function tab_peach_puff { title "$1"; tab_color 255 218 185; } | |
function tab_misty_rose { title "$1"; tab_color 255 228 225; } | |
function tab_lavender_blush { title "$1"; tab_color 255 240 245; } | |
function tab_linen { title "$1"; tab_color 250 240 230; } | |
function tab_old_lace { title "$1"; tab_color 253 245 230; } | |
function tab_papaya_whip { title "$1"; tab_color 255 239 213; } | |
function tab_sea_shell { title "$1"; tab_color 255 245 238; } | |
function tab_mint_cream { title "$1"; tab_color 245 255 250; } | |
function tab_slate_gray { title "$1"; tab_color 112 128 144; } | |
function tab_light_slate_gray { title "$1"; tab_color 119 136 153; } | |
function tab_light_steel_blue { title "$1"; tab_color 176 196 222; } | |
function tab_lavender { title "$1"; tab_color 230 230 250; } | |
function tab_floral_white { title "$1"; tab_color 255 250 240; } | |
function tab_alice_blue { title "$1"; tab_color 240 248 255; } | |
function tab_ghost_white { title "$1"; tab_color 248 248 255; } | |
function tab_honeydew { title "$1"; tab_color 240 255 240; } | |
function tab_ivory { title "$1"; tab_color 255 255 240; } | |
function tab_azure { title "$1"; tab_color 240 255 255; } | |
function tab_snow { title "$1"; tab_color 255 250 250; } | |
function tab_black { title "$1"; tab_color 0 0 0; } | |
function tab_dim_gray_dim_grey { title "$1"; tab_color 105 105 105; } | |
function tab_gray_grey { title "$1"; tab_color 128 128 128; } | |
function tab_dark_gray_dark_grey { title "$1"; tab_color 169 169 169; } | |
function tab_silver { title "$1"; tab_color 192 192 192; } | |
function tab_light_gray_light_grey { title "$1"; tab_color 211 211 211 ; } | |
function tab_gainsboro { title "$1"; tab_color 220 220 220; } | |
function tab_white_smoke { title "$1"; tab_color 245 245 245; } | |
function tab_white { title "$1"; tab_color 255 255 255; } | |
# Pure colors to be overridden later | |
function tab_pure_red { title "$1"; tab_color 255 0 0; } | |
function tab_pure_orange { title "$1"; tab_color 255 165 0; } | |
function tab_pure_green { title "$1"; tab_color 0 128 0; } | |
function tab_pure_blue { title "$1"; tab_color 0 0 255; } | |
function tab_pure_yellow { title "$1"; tab_color 255 255 0; } | |
# Overridden colors | |
function tab_red() { title "$1"; tab_color 195 89 76; } | |
function tab_orange() { title "$1"; tab_color 219 154 88; } | |
function tab_green() { title "$1"; tab_color 65 174 76; } | |
function tab_blue() { title "$1"; tab_color 92 155 204; } | |
function tab_yellow() { title "$1"; tab_color 240 240 0; } | |
function tab_color() { | |
echo -n -e "\033]6;1;bg;red;brightness;$1\a" | |
echo -n -e "\033]6;1;bg;green;brightness;$2\a" | |
echo -n -e "\033]6;1;bg;blue;brightness;$3\a" | |
} |
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
#!/bin/bash | |
# Bash completion support for Rake, Ruby Make. | |
# This messes up COMP_WORDBREAKS throughout the system. | |
# Fixing it to restrict changes to rakecomplete only. | |
# export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/} | |
_rakecomplete() { | |
local cur | |
_get_comp_words_by_ref -n : cur | |
rakefile=`find . -maxdepth 1 -iname Rakefile` | |
if [ "$rakefile" != "" ]; then | |
recent=`ls -t .rake_tasks~ ${rakefile} **/*.rake 2> /dev/null | head -n 1` | |
if [[ $recent != '.rake_tasks~' ]]; then | |
rake --silent --prereqs | grep "rake" | cut -d " " -f 2 > .rake_tasks~ | |
fi | |
COMPREPLY=($(compgen -W "`cat .rake_tasks~`" -- "$cur")) | |
# remove colon containing prefix from COMPREPLY items | |
__ltrim_colon_completions "$cur" | |
return 0 | |
fi | |
} | |
complete -o default -o nospace -F _rakecomplete rake |
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
#! /bin/bash | |
set -x | |
PLATFORM='unknown' | |
unamestr=`uname -s` | |
if [[ "$unamestr" == 'Linux' ]]; then PLATFORM='linux' | |
elif [[ "$unamestr" == 'Darwin' ]]; then PLATFORM='osx' | |
fi | |
CURDIR=`pwd` | |
ln -i -s "$CURDIR/.bash_profile" ~/.bash_profile | |
ln -i -s "$CURDIR/.gitconfig" ~/.gitconfig | |
ln -i -s "$CURDIR/.inputrc" ~/.inputrc | |
ln -i -s "$CURDIR/.lftp" ~/.lftp | |
mkdir -p ~/.ssh | |
ln -i -s "$CURDIR/.ssh/config" ~/.ssh/config | |
ln -i -s "$CURDIR/.vim" ~/.vim | |
ln -i -s "$CURDIR/.vimrc" ~/.vimrc | |
ln -i -s "$CURDIR/.forward" ~/.forward | |
ln -i -s "$CURDIR/.gemrc" ~/.gemrc | |
ln -i -s "$CURDIR/.screenrc" ~/.screenrc | |
mkdir -p ~/.vimswp | |
ln -i -s "$CURDIR/bin" ~/bin | |
if [[ $PLATFORM == 'osx' ]]; then | |
ln -i -s "$CURDIR/.vagrant.d" ~/.vagrant.d | |
ln -i -s "$CURDIR/texmf" ~/Library/texmf | |
ln -i -s "$CURDIR/.tm_properties" ~/.tm_properties | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment