mirror of https://github.com/bjeanes/dotfiles.git
shell stuff
parent
3989f08846
commit
7cd251083d
|
@ -9,10 +9,11 @@ alias top='top -o cpu'
|
||||||
alias et="$EDITOR ."
|
alias et="$EDITOR ."
|
||||||
|
|
||||||
alias sprof="reload"
|
alias sprof="reload"
|
||||||
|
alias eprof="$EDITOR $HOME/.config"
|
||||||
|
|
||||||
alias home="cd $HOME" # the tilde is too hard to reach
|
alias home="cd $HOME" # the tilde is too hard to reach
|
||||||
alias systail='tail -f -n0 /var/log/system.log'
|
alias systail='tail -fn0 /var/log/system.log'
|
||||||
alias aptail='tail -f -n0 /var/log/apache*/*log'
|
alias aptail='tail -fn0 /var/log/apache*/*log'
|
||||||
alias l='ls'
|
alias l='ls'
|
||||||
alias b='cd -'
|
alias b='cd -'
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ alias c='clear' # shortcut to clear your terminal
|
||||||
alias profileme="history | awk '{print \$2}' | awk 'BEGIN{FS=\"|\"}{print \$1}' | sort | uniq -c | sort -n | tail -n 20 | sort -nr"
|
alias profileme="history | awk '{print \$2}' | awk 'BEGIN{FS=\"|\"}{print \$1}' | sort | uniq -c | sort -n | tail -n 20 | sort -nr"
|
||||||
|
|
||||||
# rails stuff
|
# rails stuff
|
||||||
alias log='tail -f -0 ./log/*.log'
|
alias log='tail -fn0 ./log/*.log /var/log/apache*/*log'
|
||||||
alias ss='ruby ./script/server'
|
alias ss='ruby ./script/server'
|
||||||
alias sc='ruby ./script/console'
|
alias sc='ruby ./script/console'
|
||||||
alias gen='script/generate'
|
alias gen='script/generate'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/local/mongodb/bin:/usr/local/pgsql/bin:/usr/X11/bin:/opt/local/bin:${PATH}"
|
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/local/mongodb/bin:/usr/local/pgsql/bin:/usr/X11/bin:/opt/local/bin:${PATH}"
|
||||||
CDPATH=".:${HOME}"
|
CDPATH=".:${HOME}"
|
||||||
|
|
||||||
source $DOT_FILES/$CURRENT_SHELL/config.*sh
|
source $DOT_FILES/$CURRENT_SHELL/config.*sh
|
||||||
|
|
|
@ -1,3 +1,20 @@
|
||||||
|
function GET() {
|
||||||
|
curl -i -X GET -H "X-Requested-With: XMLHttpRequest" $*
|
||||||
|
}
|
||||||
|
|
||||||
|
function POST() {
|
||||||
|
curl -i -X POST -H "X-Requested-With: XMLHttpRequest" $*
|
||||||
|
#-d "key=val"
|
||||||
|
}
|
||||||
|
|
||||||
|
function PUT() {
|
||||||
|
curl -i -X PUT -H "X-Requested-With: XMLHttpRequest" $*
|
||||||
|
}
|
||||||
|
|
||||||
|
function DELETE() {
|
||||||
|
curl -i -X DELETE -H "X-Requested-With: XMLHttpRequest" $*
|
||||||
|
}
|
||||||
|
|
||||||
function f() { find * -name $1; }
|
function f() { find * -name $1; }
|
||||||
function p() {
|
function p() {
|
||||||
cd $* && m
|
cd $* && m
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
|
[ `which hub` ] && alias git='hub'
|
||||||
|
|
||||||
alias gi='git init'
|
alias gi='git init'
|
||||||
alias gst='git status'
|
alias gst='git status -s'
|
||||||
alias gl='git pull --rebase'
|
alias gl='git pull --rebase'
|
||||||
alias gp='git push'
|
alias gp='git push'
|
||||||
alias gpa='git push-all' # see [alias] in ~/.gitconfig
|
alias gpa='git push-all' # see [alias] in ~/.gitconfig
|
||||||
|
@ -15,6 +17,7 @@ alias gk='gitk --all &'
|
||||||
alias gx="open -b nl.frim.GitX"
|
alias gx="open -b nl.frim.GitX"
|
||||||
alias grm="git stat | grep deleted | awk '{print $3}' | xargs git rm"
|
alias grm="git stat | grep deleted | awk '{print $3}' | xargs git rm"
|
||||||
alias gpatch='git diff master -p'
|
alias gpatch='git diff master -p'
|
||||||
|
alias glg="git log --decorate --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
|
||||||
alias ignore_empty='find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;'
|
alias ignore_empty='find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;'
|
||||||
|
|
||||||
function gd() {
|
function gd() {
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
export EDITOR='mate -wl1'
|
export EDITOR='mate -wl1'
|
||||||
|
export VISUAL=$EDITOR
|
||||||
|
export GIT_EDITOR=$EDITOR
|
||||||
|
|
||||||
export PATH="/Library/PostgreSQL8/bin/:$PATH"
|
export PATH="/Library/PostgreSQL8/bin/:$PATH"
|
||||||
CDPATH="${CDPATH}:${HOME}/Code/Mocra/:${HOME}/Code/Personal:${HOME}/Sites/Mocra/:${HOME}/Sites/Personal/"
|
CDPATH="${CDPATH}:${HOME}/Code/Mocra/:${HOME}/Code/Personal:${HOME}/Sites/Mocra:${HOME}/Sites/Personal:${HOME}/Sites/Client/"
|
||||||
|
|
||||||
alias o='open .'
|
alias o='open .'
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ function color {
|
||||||
if [ $CURRENT_SHELL = 'zsh' ]; then
|
if [ $CURRENT_SHELL = 'zsh' ]; then
|
||||||
echo "%{$chosen%}"
|
echo "%{$chosen%}"
|
||||||
else
|
else
|
||||||
printf "$chosen"
|
printf $chosen®
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,29 @@ alias reload="source ~/.zshrc"
|
||||||
bindkey "\e\e[C" vi-forward-word
|
bindkey "\e\e[C" vi-forward-word
|
||||||
bindkey "\e\e[D" vi-backward-word
|
bindkey "\e\e[D" vi-backward-word
|
||||||
|
|
||||||
|
# # forward/back directories with Option+Up/Down
|
||||||
|
# function back-dir {
|
||||||
|
# cd -1 >/dev/null
|
||||||
|
# echo
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# function fwd-dir {
|
||||||
|
# cd +1 >/dev/null
|
||||||
|
# echo
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# zle -N back-dir back-dir
|
||||||
|
# zle -N fwd-dir fwd-dir
|
||||||
|
#
|
||||||
|
# bindkey "\e\e[A" back-dir
|
||||||
|
# bindkey "\e\e[B" fwd-dir
|
||||||
|
|
||||||
# http://www.scannedinavian.com/~shae/shae.zshrc
|
# http://www.scannedinavian.com/~shae/shae.zshrc
|
||||||
# These are options I've copied but yet to totally investigate if it's what I want
|
# These are options I've copied but yet to totally investigate if it's what I want
|
||||||
setopt alwaystoend # when complete from middle, move cursor
|
setopt alwaystoend # when complete from middle, move cursor
|
||||||
setopt completeinword # not just at the end
|
setopt completeinword # not just at the end
|
||||||
setopt correct # spelling correction
|
setopt correct # spelling correction
|
||||||
setopt histverify # when using ! cmds, confirm first
|
setopt histverify # when using ! cmds, confirm first
|
||||||
setopt interactivecomments # escape commands so i can use them later
|
|
||||||
setopt listpacked # compact completion lists
|
setopt listpacked # compact completion lists
|
||||||
setopt noautomenu # don't cycle completions
|
setopt noautomenu # don't cycle completions
|
||||||
setopt pushdignoredups # and don't duplicate them
|
setopt pushdignoredups # and don't duplicate them
|
||||||
|
@ -32,8 +48,10 @@ setopt extendedglob # awesome pattern matching (ala Dir.glob() in Rub
|
||||||
setopt promptcr # ensure a new line before prompt is drawn
|
setopt promptcr # ensure a new line before prompt is drawn
|
||||||
setopt listtypes # show types in completion
|
setopt listtypes # show types in completion
|
||||||
setopt nocompletealiases # Allows alias 'ga' to use 'git add' completions (for example)
|
setopt nocompletealiases # Allows alias 'ga' to use 'git add' completions (for example)
|
||||||
|
setopt interactivecomments # escape commands so i can use them later
|
||||||
|
|
||||||
|
|
||||||
# jump to each element in a path with m-f m-b, same
|
# jump to each element in a path with m-f m-b, same
|
||||||
# for kill-word, etc.
|
# for kill-word, etc.
|
||||||
export WORDCHARS=''
|
WORDCHARS=''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue