help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help-nano Digest, Vol 181, Issue 1


From: Calvin Smith
Subject: Re: Help-nano Digest, Vol 181, Issue 1
Date: Mon, 5 Jun 2023 16:17:12 +0000 (UTC)

There is a way to change nano's default save and backup directories, but I personally have never wanted to do this as one of the main advantages of nano is that you operate it from the command line. Also, if a file is genuinely important, I generally want the backup to be
saved on something else other than my personal computer.

https://www.nano-editor.org/dist/v2.1/nano.html

On Monday, June 5, 2023 at 12:02:46 PM EDT, help-nano-request@gnu.org <help-nano-request@gnu.org> wrote:


Send Help-nano mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Help-nano digest..."


Today's Topics:

  1. Choosing directory to save file to, inside nano (Find Marbles)
  2. Re: Choosing directory to save file to, inside nano
      (Chris Allegretta)
  3. Re: Choosing directory to save file to, inside nano (Find Marbles)
  4. Re: Choosing directory to save file to, inside nano
      (Benno Schulenberg)
  5. Re: Choosing directory to save file to, inside nano (Find Marbles)


----------------------------------------------------------------------

Message: 1
Date: Mon, 5 Jun 2023 10:37:48 +0200
From: Find Marbles <locatemarbles@gmail.com>
Subject: Choosing directory to save file to, inside nano
Message-ID:
Content-Type: text/plain; charset="utf-8"

Hello,
is there a way to choose/change the directory to which I can save a file
to, inside nano, without having to manually type it out?
The reason I'm asking is because I have a script which pipes the text
output to nano -
After doing some editing of the text, I want to give the file a new name
and save it to a directory of my choosing.
Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Mon, 05 Jun 2023 08:54:06 -0400
From: Chris Allegretta <chrisa@asty.org>
Subject: Re: Choosing directory to save file to, inside nano
Content-Type: text/plain; charset="utf-8"

Hello. Don't think so, as nano's default concept of where to save files is based on either its working directory, or the path of the file. For stdin there is of course no path to start from, and working dir is just where it is invoked. I believe if you wanted to get closer, albeit outside nano, you could pipe the output to:

(cd somedirectory && nano -)

Nano would then start from there for saving the output to a relative path.


On June 5, 2023 4:37:48 AM EDT, Find Marbles <locatemarbles@gmail.com> wrote:
>Hello,
>is there a way to choose/change the directory to which I can save a file
>to, inside nano, without having to manually type it out?
>The reason I'm asking is because I have a script which pipes the text
>output to nano -
>After doing some editing of the text, I want to give the file a new name
>and save it to a directory of my choosing.
>Thank you in advance
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 3
Date: Mon, 5 Jun 2023 16:54:12 +0200
From: Find Marbles <locatemarbles@gmail.com>
To: help-nano@gnu.org, chrisa@asty.org
Subject: Re: Choosing directory to save file to, inside nano
Message-ID:
    <CAK+dMbqpvbwY1fw7iQTPE1V3Jh-Ng=Nt4_14bjrBO0H5XAHoAQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi thanks for answering,
I was kind of fearing that, but isn't there maybe a possibility of a key
binding combination that could call an external script doing all or part of
the necessary work? Making a shell script with fzf navigating through the
directories and saving the user choice into clipboard is easy achievable.
How to call such a script then in nano through a key binding? If at all
possible, of course.
Thank you anyway.

Am Mo., 5. Juni 2023 um 14:54 Uhr schrieb Chris Allegretta <chrisa@asty.org
>:

> Hello. Don't think so, as nano's default concept of where to save files is
> based on either its working directory, or the path of the file. For stdin
> there is of course no path to start from, and working dir is just where it
> is invoked. I believe if you wanted to get closer, albeit outside nano, you
> could pipe the output to:
>
> (cd somedirectory && nano -)
>
> Nano would then start from there for saving the output to a relative path.
>
>
> On June 5, 2023 4:37:48 AM EDT, Find Marbles <locatemarbles@gmail.com>
> wrote:
>
>> Hello,
>> is there a way to choose/change the directory to which I can save a file
>> to, inside nano, without having to manually type it out?
>> The reason I'm asking is because I have a script which pipes the text
>> output to nano -
>> After doing some editing of the text, I want to give the file a new name
>> and save it to a directory of my choosing.
>> Thank you in advance
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 4
Date: Mon, 5 Jun 2023 17:05:22 +0200
From: Benno Schulenberg <bensberg@telfort.nl>
Subject: Re: Choosing directory to save file to, inside nano
Content-Type: text/plain; charset="utf-8"; Format="flowed"


Op 05-06-2023 om 10:37 schreef Find Marbles:
> is there a way to choose/change the directory to which I can save a file to,
> inside nano, without having to manually type it out?

The file browser (^O^T) is not what you mean, right?

But maybe --operatingdir (short: -o) is what you're looking for?

  yourscript | nano - -o /path/to/your/saving/folder

After ^S you then have to type just the name of the file, and
nano will save it in the folder passed with -o.

Benno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature

------------------------------

Message: 5
Date: Mon, 5 Jun 2023 17:18:59 +0200
From: Find Marbles <locatemarbles@gmail.com>
To: help-nano@gnu.org, bensberg@telfort.nl
Subject: Re: Choosing directory to save file to, inside nano
Message-ID:
Content-Type: text/plain; charset="utf-8"

The file browser would indeed be ideal, but it seems I'm too stupid to
utilize it. Could you walk me through it? Text has been inputted into nano
and nano has been opened. ^O opens save menu and ^T the file browser, I
navigate to the directory I want and then what?


Am Mo., 5. Juni 2023 um 17:05 Uhr schrieb Benno Schulenberg <

>
> But maybe --operatingdir (short: -o) is what you're looking for?
>
>    yourscript | nano - -o /path/to/your/saving/folder
>
> After ^S you then have to type just the name of the file, and
> nano will save it in the folder passed with -o.
>
> Benno
>
Unfortunately no. The saving folder is not set. It changes from text to
text.
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Subject: Digest Footer

_______________________________________________
Help-nano mailing list


------------------------------

End of Help-nano Digest, Vol 181, Issue 1
*****************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]