more supported grep usage
This commit is contained in:
@@ -70,7 +70,7 @@ function qcd() {
|
|||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then \cd
|
then \cd
|
||||||
else
|
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/*:/}
|
d=${d/*:/}
|
||||||
if [ ! -z "$d" ]
|
if [ ! -z "$d" ]
|
||||||
then \cd "$d"
|
then \cd "$d"
|
||||||
|
|||||||
Reference in New Issue
Block a user