[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-nano] exit without saving
From: |
Mike Brown |
Subject: |
Re: [Help-nano] exit without saving |
Date: |
Sun, 15 Nov 2015 17:31:44 -0700 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sun, Nov 15, 2015 at 06:18:13PM +0100, Benno Schulenberg wrote:
> > ...^X
> >
> > "aw crap! I'm being asked for a filename to save, must not have permission
> > to
> > edit not-mine.txt after all!"
>
> But most of the time you would be wanting to save the edits
> you made, no? To then 'sudo cp' them to the actual file.
Oh you GNU/Linux people, thinking every OS comes with sudo. :)
Usually the edits are small and I don't mind discarding them, and
redoing them after I'm root. So to recap, these are my choices,
currently, when -t was given on the command line:
^Z, killall nano, su, run nano as root
save to a writable location, su, move the file, chown or chmod
open another shell, su, chown or chmod the file, ^X in first
shell, chown or chmod it back in second shell, exit second shell
> But never mind that. :) I think a discard-buffer key is a
> good idea.
Anything to avoid the su / sudo and get me out of nano cleanly!