more supported grep usage
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user