Created
December 9, 2008 17:11
-
-
Save kogakure/33970 to your computer and use it in GitHub Desktop.
Bash: .bash_profile, .bashrc
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
source ~/.bashrc | |
# Unix Aliase | |
alias ll="ls -lisa" | |
alias la="ls -la" | |
alias ls-l="ls -l" | |
alias cd..="cd .." | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias workssh="ssh user@domain" | |
alias homessh="ssh user@domain" | |
alias svnserver="svn://domain/online/websites/" | |
# Git Aliase | |
alias gst='git status' | |
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff | mate' | |
alias gc='git commit -v' | |
alias gca='git commit -v -a' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gsr='git svn rebase' | |
alias gsc='git svn dcommit' | |
alias gho='$(git remote -v | grep github | sed -e "s/.*git\:\/\/\([a-z]\.\)*/\1/" -e "s/\.git$//g" -e "s/.*@\(.*\)$/\1/g" | tr ":" "/" | tr -d "\011" | sed -e "s/^/open http:\/\//g")' | |
# Tree | |
alias tree="find . -print | sed -e 's;[^/]*/;|-- ;g;s;-- |; |;g'" | |
# Memory | |
alias memcheck='ps -u $LOGNAME -o pid,rss,command' | |
alias memtotal='ps -u $LOGNAME h -o rss | (tr '\n' +; echo 0) | bc' | |
# PATH | |
export PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH" | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/postgresql-8.2.5/bin:$PATH" | |
export PATH="/Users/user/Archiv/Programmierung/Shell/bin:$PATH" | |
# PYTHONPATH | |
export PYTHONPATH="/Users/user/Archiv/Programmierung/Python/Module/misc:$PYTHONPATH" | |
# PostgreSQL | |
alias pg_ctl="sudo -u postgres pg_ctl" | |
# MANPATH | |
export MANPATH="/usr/local/man:$MANPATH" | |
# Editoren | |
export EDITOR="mate -w" | |
export CVSEDITOR="mate -w" | |
export SVN_EDITOR="mate -w" | |
# Proxy | |
export http_proxy="http://user:pw@IP:port" | |
export https_proxy="http://user:pw@IP:port" | |
export ftp_proxy="http://user:pw@IP:port" | |
export HTTP_PROXY=$http_proxy | |
export HTTPS_PROXY=$https_proxy | |
export FTP_PROXY=$ftp_proxy | |
export proxy="IP:port" | |
export http_proxy_user="user" | |
export proxy_username="user" | |
export http_proxy_pass="pw" | |
export proxy_password="pw" | |
export GIT_CURL_VERBOSE="1" | |
# Unicode | |
export LC_CTYPE=de_DE.UTF-8 | |
# Universaler Entpacker | |
extract () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) rar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; | |
*.tbz2) tar xjf $1 ;; | |
*.tgz) tar xzf $1 ;; | |
*.zip) unzip $1 ;; | |
*.Z) uncompress $1 ;; | |
*) echo "'$1' cannot be extracted via extract()" ;; | |
esac | |
else | |
echo "'$1' is not a valid file" | |
fi | |
} | |
# Farbiges Terminal | |
# PS1='\u@\w\$ ' | |
NORMAL='\[\033[00m\]' | |
BGREEN='\[\033[1;32m\]' | |
BBLUE='\[\033[1;34m\]' | |
GREEN='\[\033[0;32m\]' | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /'; | |
} | |
parse_svn_rev() { | |
svn info 2> /dev/null | grep "Revision" | sed 's/Revision: \(.*\)/r\1 /'; | |
} | |
export PS1="${BGREEN}\u@\h ${GREEN}\$(parse_git_branch)\$(parse_svn_rev)${BBLUE}[${NORMAL}\w${BBLUE}]\n${BBLUE}$ ${NORMAL}" | |
export TERM="xterm-color" | |
export CLICOLOR="true" | |
export LSCOLORS="gxfxcxdxbxegedabagacad" | |
source "/Users/<user>/Archiv/Programmierung/Shell/bin/git-completion.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
export TERM=xterm-color | |
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32' | |
export CLICOLOR=1 | |
alias ls='ls -G' | |
export COLOR_NC='\e[0m' # No Color | |
export COLOR_WHITE='\e[1;37m' | |
export COLOR_BLACK='\e[0;30m' | |
export COLOR_BLUE='\e[0;34m' | |
export COLOR_LIGHT_BLUE='\e[1;34m' | |
export COLOR_GREEN='\e[0;32m' | |
export COLOR_LIGHT_GREEN='\e[1;32m' | |
export COLOR_CYAN='\e[0;36m' | |
export COLOR_LIGHT_CYAN='\e[1;36m' | |
export COLOR_RED='\e[0;31m' | |
export COLOR_LIGHT_RED='\e[1;31m' | |
export COLOR_PURPLE='\e[0;35m' | |
export COLOR_LIGHT_PURPLE='\e[1;35m' | |
export COLOR_BROWN='\e[0;33m' | |
export COLOR_YELLOW='\e[1;33m' | |
export COLOR_GRAY='\e[1;30m' | |
export COLOR_LIGHT_GRAY='\e[0;37m' | |
alias colorslist="set | egrep 'COLOR_\w*'" |
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 PATH=/opt/local/bin:/opt/local/sbin:$PATH | |
export PATH=$PATH:/usr/local/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment