|
|
|
############################################################################# |
|
# current prompt |
|
############################################################################# |
|
# \d – Current date |
|
# \t – Current time |
|
# \h – Host name |
|
# \# – Command number |
|
# \u – User name |
|
# \W – Current working directory (ie: Desktop/) |
|
# \w – Current working directory, full path (ie: /Users/Admin/Desktop) |
|
# export PS1="\u@\h\w: " |
|
export PS1="\w: " |
|
|
|
############################################################################# |
|
# git autocomplet and bash prompt |
|
# sudo port selfupdate |
|
# sudo port install git-core +bash_completion +doc +svn |
|
############################################################################# |
|
|
|
# Bash shell command completion |
|
if [ -f /opt/local/share/doc/git-core/contrib/completion/git-completion.bash ]; then |
|
. /opt/local/share/doc/git-core/contrib/completion/git-completion.bash |
|
fi |
|
|
|
if [ -f /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh ]; then |
|
. /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh |
|
fi |
|
|
|
# prompt |
|
|
|
GIT_PS1_SHOWDIRTYSTATE=1 |
|
GIT_PS1_SHOWUNTRACKEDFILES=1 |
|
GIT_PS1_SHOWUPSTREAM="git verbose legacy" |
|
export PSORIG="$PS1" # pokud chcete zachovat puvodni PS1 |
|
PS1=$PSORIG'$(__git_ps1 "\[\033[01;31m\]%s \[\033[00m\]")' |
|
|
|
############################################################################# |
|
# apache aliases |
|
############################################################################# |
|
|
|
alias apachectl='sudo /opt/local/apache2/bin/apachectl' |
|
alias apache-start="sudo /opt/local/apache2/bin/apachectl start" |
|
alias apache-restart="sudo /opt/local/apache2/bin/apachectl restart" |
|
alias apache-stop="sudo /opt/local/apache2/bin/apachectl stop" |
|
alias apache-graceful="sudo /opt/local/apache2/bin/apachectl graceful" |
|
|
|
############################################################################# |
|
# memcached |
|
############################################################################# |
|
|
|
alias memcached-start="/opt/local/bin/memcached -m 1 -l 127.0.0.1 -p 11211 -d" |
|
alias memcached-stop="killall memcached" |
|
alias memcached-restart="killall memcached && /opt/local/bin/memcached -m 1 -l 127.0.0.1 -p 11211 -d" |
|
|
|
############################################################################# |
|
# mongo |
|
############################################################################# |
|
|
|
alias mongo-start="sudo /opt/local/bin/mongod --fork --journal --logpath /var/log/mongo.log --logappend --dbpath /data/mongo/" |
|
|
|
############################################################################# |
|
# mongo |
|
############################################################################# |
|
|
|
alias mysql="/opt/local/lib/mysql5/bin/mysql" |
|
|
|
############################################################################# |
|
# perl env variables for git |
|
############################################################################# |
|
|
|
export LC_CTYPE=en_US.UTF-8 |
|
export LC_ALL=en_US.UTF-8 |
|
|
|
############################################################################# |
|
# Path to macports |
|
############################################################################# |
|
|
|
export PATH=/opt/local/bin:/opt/local/sbin:$PATH |
|
|
|
############################################################################# |
|
# aliases |
|
############################################################################# |
|
|
|
alias ll="ls -la" # ll alias |
|
alias drives="df -h" # list all drives |
|
|
|
############################################################################# |
|
# ant tags autocomplete |
|
# see http://matthew.mceachen.us/blog/ant-bash-completion-on-mac-os-x-43.html |
|
# sudo port install bash-completion apache-ant |
|
############################################################################# |
|
|
|
if [ -f /opt/local/etc/bash_completion ]; then |
|
. /opt/local/etc/bash_completion |
|
fi |
|
complete -C /opt/local/share/java/apache-ant/bin/complete-ant-cmd.pl ant |
|
|
|
############################################################################# |
|
# bash history size |
|
############################################################################# |
|
|
|
export HISTCONTROL=erasedups |
|
export HISTSIZE=10000 |
|
shopt -s histappend |
|
|
|
|
|
|