From f126f4931b6d99372530113c90726999e26b7ad7 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 31 Aug 2012 20:36:11 +0900 Subject: [PATCH] add pushd func as comment --- bashrc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 4e7942c..9b32f4a 100755 --- a/bashrc +++ b/bashrc @@ -117,7 +117,8 @@ alias mv="mv -v" alias psaux="ps auxww" alias q=exit alias e3=e3em -alias dirs="dirs -v -l | \grep -v \$(printf '%s$' \$PWD)" +#alias dirs="dirs -v -l | \grep -v \$(printf '%s$' \$PWD)" +alias dirs="dirs -v -l" alias po=popd alias pu=pushd alias sudo="sudo " # use aliases through sudo @@ -209,13 +210,24 @@ cd(){ elif test $1 = - then local pwd="$PWD" - popd + popd >/dev/null pushd -n "$pwd" # stack last dir else pushd "$@" 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 +# } + input(){ local foo stty -echo