Add several aliases

This commit is contained in:
Andrew Tomaka 2013-02-24 16:20:59 -05:00
parent 250c75ce56
commit dd5c929439

29
.bashrc
View file

@ -7,8 +7,7 @@ usern=$(whoami)
function prompt { function prompt {
ctime=$(date +%T) ctime=$(date +%T)
prmpt="[${PWD}][${ctime}]" prmpt="[${PWD}][${ctime}]"
cols=$(tput cols) let FILLS=${COLUMNS}-${#prmpt}
let FILLS=${cols}-${#prmpt}
LINE="" LINE=""
if [[ "$PWD" =~ "/home/$usern" ]]; then if [[ "$PWD" =~ "/home/$usern" ]]; then
@ -34,19 +33,27 @@ PROMPT_COMMAND=prompt
# [----------------------------------------------------------------------------] # [----------------------------------------------------------------------------]
# [----------------------------- ALIAS ---------------------------------------] # [----------------------------- ALIAS ---------------------------------------]
# [----------------------------------------------------------------------------] # [----------------------------------------------------------------------------]
# Common parameters # Common parameters
if [ "$OSTYPE" == "linux-gnu" ]; then alias ls='ls -v --color=auto'
alias ls='ls -v --color=auto' alias ll='ls -lavh'
alias ll='ls -lavh' alias grep='grep --color'
alias grep='grep --color'
else
alias ls='ls'
alias ll='ls -la'
alias grep='grep'
fi
alias sudo='sudo env PATH=$PATH' alias sudo='sudo env PATH=$PATH'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# for git
alias get='git'
alias ga='git add'
alias gaa='git add .'
alias gs='git status'
alias gl='git log'
alias gcm='git commit -m'
alias gcf='git commit -F'
# [----------------------------------------------------------------------------] # [----------------------------------------------------------------------------]
# [------------------------------ OTHER ---------------------------------------] # [------------------------------ OTHER ---------------------------------------]
# [----------------------------------------------------------------------------] # [----------------------------------------------------------------------------]