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.

picker.sh 557 B

6 vuotta sitten
6 vuotta sitten
123456789101112131415161718192021222324
  1. #!/usr/bin/env sh
  2. # Description: Pick files and pipe the line-separated list to another utility
  3. #
  4. # Shell: generic
  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. # or, in fish shell:
  13. # ls -l (picker)
  14. # cd (picker)
  15. #
  16. # NOTE: This use case is limited to picking files, other functionality may not work as expected.
  17. nnn -p /tmp/picked
  18. if [ -f /tmp/picked ]; then
  19. cat /tmp/picked | tr '\0' '\n'
  20. rm /tmp/picked
  21. fi