My build of nnn with minor changes
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

viuimg 808 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env sh
  2. # Description: View an image or images in a directory in pager
  3. #
  4. # Note: While it's very easy to fix this in Bash (sample commented), with the
  5. # current POSIX shell script implementation the unmatched patterns are spewed.
  6. # A patch to fix this is highly appreciated.
  7. #
  8. # Shell: POSIX compliant
  9. # Author: Arun Prakash Jana
  10. if ! [ -z "$1" ]; then
  11. if [ -d "$1" ]; then
  12. cd "$1"
  13. # Bash implementation
  14. # shopt -s nullglob
  15. # viu -n *.bmp *.BMP *.gif *.GIF *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.svg *.SVG 2>/dev/null | less -R
  16. for file in *.bmp *.BMP *.gif *.GIF *.jpg *.JPG *.jpeg *.JPEG *.png *.PNG *.svg *.SVG
  17. do
  18. viu -n "$file" 2>/dev/null
  19. done | less -R
  20. else
  21. viu -n "$1" | less -R
  22. fi
  23. fi