My build of nnn with minor changes
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

22 рядки
607 B

  1. #!/usr/bin/env sh
  2. # Description: Decrypts selected files using gpg. The contents of the decrypted file are stored in a file with extension .dec
  3. #
  4. # Note: If an appropriate private key cannot be found gpg silently prints a message in the background and no files are written.
  5. #
  6. # Shell: POSIX compliant
  7. # Author: KlzXS
  8. selection=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
  9. printf "(s)election/(c)urrent? [default=c] "
  10. read -r resp
  11. if [ "$resp" = "s" ]; then
  12. files=$(tr '\0' '\n' < "$selection")
  13. else
  14. files=$1
  15. fi
  16. printf "%s" "$files" | xargs -n1 -I{} gpg --decrypt --output "{}.dec" {}