docs:bash:profile

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/05/12 09:58] 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'
  
Line 34: Line 55:
 # is the section break between files, so you can immediately start pressing n to # is the section break between files, so you can immediately start pressing n to
 # jump between files in a diff # jump between files in a diff
-alias gd='git diff|less -p "^diff .*"'+#alias gd='git diff|less -p "^diff .*"
 +alias gd='git diff'
 alias gdc='git diff --cached|less -p "^diff .*"' alias gdc='git diff --cached|less -p "^diff .*"'
  
-alias gg='git gui&' +# an update early in 2012 to cygwin's tcl/tk package forced everything using 
-alias gk='gitk&' +# tcl/tk to be ran on an X windows server, so these gui aliases are now 
-alias gka='gitk --all&'+# 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 61: 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 67: Line 117:
 fi  fi 
 </code> </code>
- 
  
 ===== cygwin ===== ===== cygwin =====
  • docs/bash/profile.1273679897.txt.gz
  • Last modified: 2010/05/12 09:58
  • by billh