alias hgu='hg pull;hg up;' hgp() { hg st | grep '^\!' | awk '{$1="";print substr($0,2)}' | xargs -d '\n' hg add hg st | grep '^\!' | awk '{$1="";print substr($0,2)}' | xargs -d '\n' hg remove if [ -z ${1} ]; then hg commit -m"update"; else hg commit -m"${1}"; fi hg push } gitp() { git add . if [ -z ${1} ]; then git commit -m"update"; else git commit -m"${1}"; fi git push }