[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] improve nano's interface toward external tools
From: |
Benno Schulenberg |
Subject: |
Re: [RFC] improve nano's interface toward external tools |
Date: |
Mon, 4 Jan 2021 14:23:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Op 04-01-2021 om 12:59 schreef Tomas Mudrunka:
> I would love to be able to specify pair of input/output filters instead of
> file
> name. eg.:
>
> nano --read "cat file.txt" --write "tee file.txt"
You can implement that yourself by writing a script that checks for the
--read and --write options, and runs the found commands to and from a
temporary file.
> Or specify some filters to process files when reading writing. For example.:
>
> To convert binary to hexdump upon read and back to binary upon write:
>
> nano --read-filter "xxd" --write-filter "xxd -r" file.bin
Same thing: can be done with a script. Just the file name in the title
bar will not be nice.
> To have encrypted textfile for personal notes which will be decrypted and
> encrypted automaticaly by nano upon access using GPG. While this is not
> perfect
> security-wise, it would be secure enough for my use case.
>
> nano --read-filter "gpg --no-use-agent --decrypt" --write-filter "gpg
> --symmetric
> -a --no-use-agent" file.gpg
Here a script will not do, because one doesn't want any temporary file.
There is a feature request (for allowing nano to write the file data to
standard output) that would enable this:
https://savannah.gnu.org/bugs/?27346.
> Dne 2021-01-04 12:40, Benno Schulenberg napsal:
>> Op 02-01-2021 om 23:17 schreef Marco Diego Aurélio Mesquita:
>>> [...]
Please learn to snip. Do not quote the entire preceding email. It is
wasteful.
Benno
signature.asc
Description: OpenPGP digital signature