Voire:
$ mapfile -td '' array < <(
fzf -m -e -i --print0 --read0 < <(
find -type f -print0 2>/dev/null
) --preview='
case $(file -b --mime-type {}) in
text*) cat {} ;;
image*) catimg -w $((2*COLUMNS)) {} ;;
application/pdf) pdftotext -layout - - <{};;
*) cat -e {};;
esac;')
- Avec ``catimg'' en plus de poppler-utils...
Le Wed, May 22, 2024 at 01:34:29PM +0200, felix via gull a écrit :
> Je n'avais jamais utilisé "fzf" avant d'essayé ça:
>
> mapfile -td '' array < <(
> fzf --read0 --print0 -m < <(
> find ~ -type f -iname '*.pdf' -print0 2>/dev/null
> ) --preview='pdftotext -layout - - <{}')
> declare -p array
>
> - L'option ``-m'' permet la sélection multiple avec la touche TAB.
> - L'utilitaire ``pdftotext'' fait partie du paquet ``poppler-utils''
--
Félix Hauri - <[email protected]> - http://www.f-hauri.ch
_______________________________________________
gull mailing list
[email protected]
https://forum.linux-gull.ch/mailman/listinfo/gull