From: "Daniel Serodio (lists)" <daniel.lists@mandic.com.br>
To: zsh-users@zsh.org
Subject: Re: Auto-correct and newly-added commands
Date: Wed, 23 Nov 2011 18:21:52 -0200 [thread overview]
Message-ID: <4ECD55E0.9050603@mandic.com.br> (raw)
In-Reply-To: <111118070726.ZM20770@torch.brasslantern.com>
Bart Schaefer wrote:
> On Nov 18, 10:50am, Daniel Serodio wrote:
> } Subject: Re: Auto-correct and newly-added commands
> }
> } Bart Schaefer wrote:
> }> On Nov 14, 4:31pm, Daniel Serodio (lists) wrote:
> }> }
> }> } It it possible to have zsh automatically run "rehash" after I reply no
> }> } to an auto-correct prompt, so it "learns" this new command?
> }>
> }> That would certainly seem logical. Also it seems strange to load up
> }> the command tables and check them for proper spellings when the word
> }> that is being checked is not in the command position to begin with.
> } Hmm, maybe my explanation wasn't clear (or I don't understand your
> } reply), but I only have problem with real commands (in the beginning of
> } the line), not with their arguments. Or did you mention "words not in
> } the command position" from reviewing the code and not my explanation?
>
> The latter (that's the first hunk of the patch).
>
> }> What this patch does is reset the incremental path search in the event
> }> the correction is rejected. That allows whatever hashing options the
> }> user has specified to kick in at the time the path is searched during
> }> command execution, rather than having to test them all here.
> } This sounds like what I need, but when I tried to apply this patch, it
> } failed (both on zsh 4.3.12 and on a fresh git clone).
>
> I'm not sure why it would have failed on 4.3.12, but it's already been
> committed to sourceforge CVS so a fresh git of the very latest probably
> won't need to have it applied.
>
> What was the failure message from patch? Did you use "patch -p0" ?
I used patch -p0 on zsh-4.3.12 sources root directory:
patching file Src/utils.c
Hunk #1 FAILED at 2498.
Hunk #2 FAILED at 2623.
2 out of 2 hunks FAILED -- saving rejects to file Src/utils.c.rej
>
> } Where should I apply this patch?
>
> For your purposes you only need the second hunk with two lines added.
> Try manually deleting the first hunk and then applying the second:
I've applied this hunk by manually typing and it works like a charm.
Thanks a lot,
Daniel Serodio
prev parent reply other threads:[~2011-11-23 20:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 18:31 Daniel Serodio (lists)
2011-11-15 4:16 ` Bart Schaefer
2011-11-18 12:50 ` Daniel Serodio
2011-11-18 15:07 ` Bart Schaefer
2011-11-23 20:21 ` Daniel Serodio (lists) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ECD55E0.9050603@mandic.com.br \
--to=daniel.lists@mandic.com.br \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).