Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Don't suggest completion functions when 'correcting' on non-existant commands



[Removed debian bugs from recipients]

On Dec 31,  6:48pm, Richard Hartmann wrote:
}
} richih@roadwarrior ~ % figlet
} zsh: correct 'figlet' to '_figlet'? [N/y/a/e]
} 
} I don't know enough about zsh internas to guesstimate if this is
} an easy fix or not. Two possible solutions which come to mind:
} 
} 1) Make zsh aware of what functions came in through $FPATH
} and which came in through $PATH

No, that doesn't make sense.  Functions never "come in" through $PATH,
only external commands do; and of functions only autoloaded ones are
affected by $FPATH.

A closer approximation to what you want would be for correction to
filter out names that are bound to widgets, but even that doesn't go
far enough; it'd also have to filter out names that begin with an
underscore.  The reason for the leading-underscore convention is so
that things like that would be possible, but of course it is only a
convention.

Filtering out widgets is problematic because correction is a part of
the base shell and ZLE is added as a module.

} 2) Make the completion function do the filtering outlined in 1)

That doesn't work either because correction and completion have almost
nothing to do with one another, internally.  Completion is long since
over before correction kicks in.

What you really want is something like $fignore applied to correction.

On Dec 31,  7:12pm, Frank Terbeck wrote:
} 
} Here's a possible solution for this:
} <http://bewatermyfriend.org/posts/2007/12-26.11-50-38-tooltime.html>

That's not really a solution; it just replaces the correction prompt
with a different prompt.  It might be interesting for other reasons.



Messages sorted by: Reverse Date, Date, Thread, Author