From 7ca1184c8e4737cb3e481892fe53c27a1ecca7a5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 4 Jan 2012 16:21:13 +0900 Subject: [PATCH] small changes, add alias upgrade --- .bashrc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.bashrc b/.bashrc index 8c356e8..501cbbd 100755 --- a/.bashrc +++ b/.bashrc @@ -69,8 +69,8 @@ alias la="ls -A" alias lla="ls -Al" # alias less="" alias vl=/usr/share/vim/vimcurrent/macros/less.sh -alias em="emacs -nw" -alias apt-get="sudo apt-get" +alias em="emacs -nw; echo emacs terminated." +# alias apt-get="sudo apt-get" alias aptin="apt-get install" alias aptsearch="apt-cache search" alias aptshow="apt-cache show" @@ -84,6 +84,11 @@ alias g=git alias q=exit alias pcalc="python -i -c 'from math import *' " alias _myreloadrc="test -f ~/.bashrc && source ~/.bashrc" +alias sudo="sudo " # use aliases through sudo +if isdarwin +then alias upgrade="port selfupdate && port sync && port upgrade installed" +else alias upgrade="sudo apt-get autoremove --yes && sudo apt-get update --yes && sudo apt-get upgrade --yes" +fi # alias diff="$(type colordiff >/dev/null 2>&1 && test $TERM != dumb && echo color)diff -u" # type trash >/dev/null 2>&1 && alias rm=trash @@ -234,9 +239,6 @@ dl-my-init-files(){ fi done } -port-autosync(){ - port selfupdate && port sync && port upgrade installed -} _mygitconfig(){ git config --global user.name '10sr' git config --global user.email '8slashes+git@gmail.com'