[Top][All Lists]

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

Re: [Nano-devel] insert command in nanorc

From: David Lawrence Ramsey
Subject: Re: [Nano-devel] insert command in nanorc
Date: Sat, 16 Aug 2003 11:39:48 -0700 (PDT)

>Hi, everyone
>I add a glob capabilities to "insert" command in nanorc. Now, it
>understand globbing pathnames (as describe in man 7 glob) and tilde.
>This patch work with nano 1.2.x. I don`t try it on cvs versions.

Thank you, but I think that glob()'s adding wildcard support to this is
overkill.  The reason I decided to put this feature in at some point is
because of what you said about the need to keep e. g. color syntaxes in
other files so that the nanorc doesn't get unmanageably huge, and I'd
like to keep it as simple as possible.

I've fused some elements of your old and new patches and added a few
tweaks of my own.  The code is in the parse_insert() function as in your
second patch, the logic used is mostly based on that used in your first
patch, and my changes to it are as follows:

* get_full_path() is used on the filename in order to handle tilde

* the nanorc file name and line number are set to those of the specified
file while that file is being parsed (so any error messages are
attributed to the right nanorc file and location) and set back

* to properly handle files with e. g. spaces in their names and files
with reserved names ("unset const" and similar things), the filename is
now parsed as a quoted argument rather than a word

The patch against nano 1.2.99-cvs is at:

Sluggy.Net: The Sluggy Freelance Community!

reply via email to

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