From 6e4cbf22c33808e37a1c5ca383f741579c520238 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 9 Sep 2012 22:08:54 +0900 Subject: [PATCH] fix pushd --- bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index dfecccb..8d61150 100755 --- a/bashrc +++ b/bashrc @@ -231,8 +231,8 @@ cd(){ } pushd(){ - local next="$(realpath "$1")" - for l in $(\dirs -v -l | \grep "^ [0-9]\+ *${next}$" | cut -d " " -f 2 | tac) + local next="$(realpath --no-symlinks "$1")" + for l in $(\dirs -v -l | \grep "^ *[0-9]\+ \+${next}$" | \grep -o "^ *[0-9]\+ " | tac) do echo $l test $l -eq 0 && continue