Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:bash:profile [2010/04/26 13:29] billhdocs:bash:profile [2013/05/09 11:12] (current) billh
Line 15: Line 15:
 export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin export PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
 export HOME=/cygdrive/h export HOME=/cygdrive/h
 +</code>
 +
 +===== php =====
 +<code bash>
 +################################################################################
 +# PHP STUFF
 +################################################################################
 +# lint (syntax) check all php files from current dir recursively
 +function lcphp()
 +{
 + find . -name "*.php" | while read file;do
 + #php -l "${file}"
 + /cygdrive/c/php5.2.9/php.exe -c c:\\php5.2.9\\php.ini -l "${file}"
 + done
 +}
 </code> </code>
  
 ===== svn ===== ===== svn =====
-<code>+<code bash> 
 +################################################################################ 
 +# SVN STUFF 
 +################################################################################
 alias ss='svn status' alias ss='svn status'
  
Line 28: Line 46:
  
 ===== git ===== ===== git =====
-<code>+<code bash> 
 +################################################################################ 
 +# GIT STUFF 
 +################################################################################
 alias gb='git branch -a' alias gb='git branch -a'
 +
 +# the -p parameter tells less to start a search for this pattern; this pattern
 +# is the section break between files, so you can immediately start pressing n to
 +# jump between files in a diff
 +#alias gd='git diff|less -p "^diff .*"'
 alias gd='git diff' alias gd='git diff'
-alias gg='git gui&' +alias gdc='git diff --cached|less -p "^diff .*"' 
-alias gk='gitk&' + 
-alias gka='gitk --all&'+# an update early in 2012 to cygwin's tcl/tk package forced everything using 
 +# tcl/tk to be ran on an X windows server, so these gui aliases are now 
 +# kickstarting TortoiseGit and msysgit programs instead 
 +# Cygwin git 
 +#alias gg='git gui&' 
 +#alias gk='gitk&' 
 + 
 +# Cygwin git / msysgit hybrid (checks if x server is available) 
 +alias gg="([ \"\$(ps|grep XWin)\" ] && git gui || mgg)&" 
 +alias gk="([ \"\$(ps|grep XWin)\" ] && gitk || mgk)&" 
 +alias gka="([ \"\$(ps|grep XWin)\" ] && gitk || mgk --all)&" 
 + 
 +#TortoiseGit 
 +alias tgg="/cygdrive/c/Program\ Files/TortoiseGit/bin/TortoiseProc.exe /command:repostatus /path:\"\`cygpath -m -a .\`\" &" 
 +alias tgk="/cygdrive/c/Program\ Files/TortoiseGit/bin/TortoiseProc.exe /command:log /path:\"\`cygpath -m -a .\`\" &" 
 + 
 +#msysgit 
 +alias mgg="/cygdrive/c/Program\ Files\ \(x86\)/Git/bin/git gui" 
 +alias mgk="/cygdrive/c/Program\ Files\ \(x86\)/Git/bin/wish.exe \"C:/Program Files (x86)/Git/bin/gitk\"" 
 + 
 +#alias gka='gitk --all&
 +alias gl='git log --abbrev-commit' 
 +alias gsl='git stash list' 
 +alias gss='git stash save' 
 +alias gsp='git stash pop' 
 +alias gsa='git stash apply'
  
 # gs conflicts with ghostscript, so we need to assume that ghostscript will # gs conflicts with ghostscript, so we need to assume that ghostscript will
Line 55: Line 106:
     git checkout $1     git checkout $1
   fi   fi
 +}
 +
 +function parse_git_branch {
 + ref=$(git symbolic-ref HEAD 2> /dev/null) || return
 + echo "("${ref#refs/heads/}")"
 } }
  
Line 61: Line 117:
 fi  fi 
 </code> </code>
- 
  
 ===== cygwin ===== ===== cygwin =====
 <code> <code>
 alias php='/cygdrive/c/php5.2.9/php.exe -c c:\\php5.2.9\\php.ini' alias php='/cygdrive/c/php5.2.9/php.exe -c c:\\php5.2.9\\php.ini'
 +alias open='/cygdrive/c/windows/explorer.exe'
 +alias gvim='/cygdrive/c/Program\ Files/Vim/vim72/gvim.exe'
  
 # this was required to make rxvt show man pages correctly # this was required to make rxvt show man pages correctly
  • docs/bash/profile.1272310150.txt.gz
  • Last modified: 2010/04/26 13:29
  • by billh