diff --git a/qcd_function b/qcd_function index 10226fd..bc73c84 100644 --- a/qcd_function +++ b/qcd_function @@ -70,7 +70,7 @@ function qcd() { if [ -z "$1" ] then \cd else - d=$( tac ~/.bash_cdhistory | grep -h ^"$1" ~/.qcd - | head -n 1 ) + d=$( grep -h ^"$1" ~/.qcd <( tac ~/.bash_cdhistory ) | head -n 1 ) d=${d/*:/} if [ ! -z "$d" ] then \cd "$d"