My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
425 B

  1. #!/usr/bin/env sh
  2. # Description: Run fd/find in subtree and list files by mime type in smart context
  3. # Dependencies: fd/find
  4. #
  5. # Shell: POSIX compliant
  6. # Author: Arun Prakash Jana
  7. . "$(dirname "$0")"/.nnn-plugin-helper
  8. if [ "$(cmd_exists fd)" -eq "0" ]; then
  9. fd=fd
  10. else
  11. fd=find
  12. fi
  13. printf "mime: "
  14. read -r mime
  15. printf "%s" "+l" > "$NNN_PIPE"
  16. $fd | file -if- | grep "$mime" | awk -F: '{printf "%s\0", $1}' > "$NNN_PIPE"