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 {
ctime=$(date +%T)
prmpt="[${PWD}][${ctime}]"
cols=$(tput cols)
let FILLS=${cols}-${#prmpt}
let FILLS=${COLUMNS}-${#prmpt}
LINE=""
if [[ "$PWD" =~ "/home/$usern" ]]; then
@ -34,19 +33,27 @@ PROMPT_COMMAND=prompt
# [----------------------------------------------------------------------------]
# [----------------------------- ALIAS ---------------------------------------]
# [----------------------------------------------------------------------------]
# Common parameters
if [ "$OSTYPE" == "linux-gnu" ]; then
alias ls='ls -v --color=auto'
alias ll='ls -lavh'
alias grep='grep --color'
else
alias ls='ls'
alias ll='ls -la'
alias grep='grep'
fi
alias ls='ls -v --color=auto'
alias ll='ls -lavh'
alias grep='grep --color'
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 ---------------------------------------]
# [----------------------------------------------------------------------------]