My build of nnn with minor changes
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

27 lines
610 B

  1. #!/usr/bin/env sh
  2. # Description: Pick files and pipe the newline-separated list to another utility
  3. #
  4. # Shell: POSIX compliant
  5. # Author: Arun Prakash Jana
  6. #
  7. # Usage:
  8. # Copy this file in your $PATH, make it executable and preferably name it to picker.
  9. # Run commands like:
  10. # ls -l `picker`
  11. # cd `picker`
  12. # vimdiff `picker`
  13. # or, in fish shell:
  14. # ls -l (picker)
  15. # cd (picker)
  16. # vimdiff (picker)
  17. #
  18. # NOTE: This use case is limited to picking files, other functionality may not work as expected.
  19. nnn -p /tmp/picked
  20. if [ -f /tmp/picked ]; then
  21. cat /tmp/picked | tr '\0' '\n'
  22. rm /tmp/picked
  23. fi