diff --git a/bashrc b/bashrc index 20343c0..12e374e 100755 --- a/bashrc +++ b/bashrc @@ -187,6 +187,7 @@ null type pacmatic && { null type apt-get && \ alias aupgrade="sudo apt-get autoremove --yes && sudo apt-get update --yes && sudo apt-get upgrade --yes" null type port && \ + alias port="port -v" alias pupgrade="sudo port -v selfupdate && { sudo port -v upgrade outdated; sudo port -v uninstall leaves; }" if iscygwin; then @@ -214,27 +215,27 @@ netwait(){ cd(){ if test $# -eq 0 then - pushd ~/ + pushd ~/ >/dev/null elif test $1 = - then local pwd="$PWD" popd >/dev/null - pushd -n "$pwd" # stack last dir + pushd -n "$pwd" >/dev/null # stack last dir else - pushd "$@" + pushd "$@" >/dev/null fi } -# pushd(){ -# local pwd="$PWD" -# for l in $(\dirs -v -l | \grep "^ [0-9]\+ ${pwd}$" | cut -d " " -f 2 | tac) -# do -# echo $l -# test $l -eq 0 && continue -# popd +$l -n -# done -# command pushd "$@" >/dev/null -# } +pushd(){ + local pwd="$PWD" + for l in $(\dirs -v -l | \grep "^ [0-9]\+ *${pwd}$" | cut -d " " -f 2 | tac) + do + echo $l + test $l -eq 0 && continue + popd +$l -n + done + command pushd "$@" >/dev/null +} input(){ local foo