bugGNU nano - Bugs: bug #27346, [Request] add support for writing...


You are not allowed to post comments on this tracker with your current authentication level.

bug #27346: [Request] add support for writing the buffer contents to standard out

Submitted by:  None
Submitted on:  Sun 30 Aug 2009 12:30:04 PM UTC  
Severity:  1 - Wish Status:  None
Assigned to:  None Open/Closed:  Open

Mon 04 Jan 2021 02:20:14 PM UTC, comment #5: 

This is a great feature! I don't see any disadvantages to implementing it (other than a few lines of code added).

This allows:

wget dangero.us/shell.sh |nano - |bash

When the file is saved, it is piped into bash, having allowed inspection and even modification. If nano is quit without saving, nothing happens.

And the patch (file #49944) still applies without any modifications..!

Peter Passchier <pepa65>
Wed 11 Nov 2020 03:08:00 PM UTC, comment #4: 

Doesn't really work: both the decoding and the encoding ask for the password -- that is too confusing.  It should ask for the password just once, but I don't know how to arrange that.

Benno Schulenberg <bens>
Project Administrator
Thu 08 Oct 2020 06:23:32 PM UTC, comment #3: 

Here's a first implementation of the feature.

(file #49944)

Benno Schulenberg <bens>
Project Administrator
Mon 08 Aug 2016 03:35:24 PM UTC, comment #2: 

It is already possible to read in the output of a decryption command by using the "read from standard input" feature.  For example: 'gpg --decrypt safebox.asc | nano -'.  But there is no way to encrypt this again without using a temporary file on disk.  What is needed is an option to tell nano to write the buffer contents not to a file but to standard output.  That doesn't look easy to make.  I don't even know if it's possible.

Benno Schulenberg <bens>
Project Administrator
Sat 14 Jun 2014 04:41:03 PM UTC, comment #1: 

I have no comprehension of GPG, but would the new --noread option be of any use to you?  (Available from nano-2.3.3 onward.)

Benno Schulenberg <bens>
Project Administrator
Sun 30 Aug 2009 12:30:04 PM UTC, original submission:  

is there possibility to get support for editing files encrypted by those commands?

gpg -c file -> .gpg file
gpg -ca file -> .asc file
ccrypt -e file -> .cpt file

It can be done by simple BASH script, but you need an intermediate file which can be bit insecure. nano can have some argument which will decrypt file when opening and encrypt file with the same password before saving/creating. or this feature can be enabled when nano is called with argv[0] "cnano" instead of "nano".

I think that this can be usefull for storing passwords or making personal notes, etc...

Thanks. ;o)



Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pepa65 (Posted a comment)
  • -email is unavailable- added by bens (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-11 bens StatusIn Progress => None
        Assigned tobens => None
    2020-10-08 bens Attached File- => Added 0001-possible-new-feature-allow-piping-out-the-buffer-via.patch, #49944
        StatusNone => In Progress
        Assigned toNone => bens
    2016-08-08 bens Summary[Request] add support for editing files encrypted with GPG or CCrypt => [Request] add support for writing the buffer contents to standard out
    2014-06-14 bens Severity3 - Normal => 1 - Wish
        Summary[Feature request] Add support for editing files encrypted with GPG or CCrypt => [Request] add support for editing files encrypted with GPG or CCrypt

    Back to the top

    Powered by Savane 3.7