On Thu, May 14, 2009 at 4:24 AM, Adam Wysocki via ArcaBit
<address@hidden> wrote:
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