more supported grep usage

This commit is contained in:
q
2013-03-18 20:51:21 +02:00
parent c5fa29accf
commit fd030faa9b

View File

@@ -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"