My build of nnn with minor changes
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

22 linhas
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" {}