Mathias Dahl <mathias.d...@gmail.com> writes:

> Got this to work:
>
>  files=$(find /home/mathias/Videos/movies/ -iname "*.avi" -type f -
> printf "%P\n" | grep "${cur}" | while read file; do
>             printf %q "$file"
>             echo
>     done)
>
> With the %q option to printf it no longer accepts a \n so I needed the
> extra echo.

printf "%q\n" works fine here.

Also, grep "${cur}" could probably be replaced by -path "*/${cur}*".

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to