Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: _man - fast searching for glob patterns



>   firstmatchingpage=$allpages[(r)$our-search-pattern]

Thank you. This is a bit faster

rep[$#rep+1]=(${(M)allpages:#${~approx}$PREFIX${~star}$SUFFIX})

it gets all matching elements and assigns them to result. The speed is
acceptable (I suppose, globbing would take the same time).

BTW I wonder, if

array[$#array+1]=(...)

is much better than

array=($array ...)

??

cheers

/andrej



Messages sorted by: Reverse Date, Date, Thread, Author