Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fasd
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ $(fasd --backend $each)"
if [ "$fnd" ]; then # dafault matching
local bre="$(printf %s\\n "$fnd" | sed 's/\([*\.\\\[]\)/\\\1/g
s@ @[^|]*@g;s/\$$/|/')"
bre='^[^|]*'"$bre"'[^|/]*|'
bre='^[^|]*'"$bre"'[^|]*|'
local _ret="$(printf %s\\n "$_fasd_data" | grep "$bre")"
[ "$_ret" ] && _ret="$(printf %s\\n "$_ret" | while read -r line; do
[ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
Expand All @@ -438,7 +438,7 @@ $(fasd --backend $each)"
sed 's/\([*\.\\\[]\)/\\\1/g;s/\$$/|/
s@\(\\\{0,1\}[^ ]\)@\1[^|/]\\{0,'"$_FASD_FUZZY"'\\}@g
s@ @[^|]*@g')"
fuzzy_bre='^[^|]*'"$fuzzy_bre"'[^|/]*|'
fuzzy_bre='^[^|]*'"$fuzzy_bre"'[^|]*|'
_ret="$(printf %s\\n "$_fasd_data" | grep -i "$fuzzy_bre")"
[ "$_ret" ] && _ret="$(printf %s\\n "$_ret" | while read -r line; do
[ -${typ:-e} "${line%%\|*}" ] && printf %s\\n "$line"
Expand Down