[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Info-nano] Nano Feature Request?
From: |
Adam Wysocki via ArcaBit |
Subject: |
Re: [Info-nano] Nano Feature Request? |
Date: |
Thu, 14 May 2009 13:24:01 +0200 (CEST) |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Tue, 12 May 2009, Damien Joldersma wrote:
> I would like to have nano, my favorite editor :), to help me handle my
> permission problems.
Personally I would like this feature too. In the meantime you can:
1. Save file in /tmp and then move it to the proper destination (that's
what I do)
2. Use Ctrl-Z (or screen) and temporarily chmod/chown
3. Write a wrapper that checks the permission and runs nano with -v option
when the file is not writable
Third option can be accomplished by using access() or even simple as:
OPTS=
echo -n >> "$@" || OPTS="-v"
nano $OPTS "$@"
Regards.
--
Software Research and Development Department, ArcaBit sp. z o.o.
Ul. Fortuny 9, 01-339 Warszawa, Poland