[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] Re: Speller changes.
From: |
Chris Allegretta |
Subject: |
[Nano-devel] Re: Speller changes. |
Date: |
Mon, 16 Dec 2002 08:38:25 -0800 |
User-agent: |
Mutt/1.2.5.1i |
On Mon, Dec 16, 2002 at 09:19:12AM -0500, David Benbennick wrote:
> Chris,
>
> To run the internal speller, Nano now does the pipeline
> spell | sort -f | uniq
> As far as I can tell, -f doesn't do anything there (and it wouldn't be
> the right thing anyway). You get the same effect with
> spell | sort -u
> Furthermore, on my system 'spell' is a script that pipes its output
> through "sort -u". Are there any real systems where this isn't the case?
Hi David,
I believe the way I coded it is best. Sort may be a script or
it may be a binary (it is on my Solaris box at work). Originally I
wasn't sure sort -u was portable, but it seems to work on any systems I
tested just now. However:
Using sort -f | uniq will return the lines
Hello
hello
next to each other. Using sort -u will return:
Hello
[many lines of words with first letter capped]
hello
Sort of the same but the user will be prompted for one hello once and
then again much later in the process. Doing it my way makes it appear
case insensitive, even though we're really doing case sensitive searches
through the list.
sort -uf will only return Hello. Definitely out.
Since this is an interactive search and replace, the most
straightforward way to do this is to ask for each capitalization of the
word. Either that, or only return an all lower case list of misspelled
words, then magically apply capitalization to the replacement word using
the capitalization of the source word as a guide. This wouldn't work
well for things like 'Hellow' 'HEllow'. I think the extra pipe to uniq
is worth it. Is there another way to return the list they way I
describe without the extra pipe to uniq?
> Also, when is 1.1.99 supposed to come out? Is the goal to fix all known
> bugs before releasing the new stable version?
1.1.99pre1 will just be the last version to include new
functionality. I haven't been able to sort through all of DLR's patches
yet, nor Ken's patch, so I was trying to get back into things slowly, by
fixing something that no one else has been messing with but I felt was
still broken, i.e. spelling. We'll probably have 3 or 4 pre's like we
did for 1.0, and then the final 1.2.0.
Chris A
--
Chris Allegretta http://www.asty.org
"Share and Enjoy" - Douglas Adams, 1952 - 2001
- [Nano-devel] Re: Speller changes.,
Chris Allegretta <=