zsh-users
 help / color / mirror / code / Atom feed
* Adding nocorrect to a preexec function
@ 2006-01-17 23:11 Eric Smith
  2006-01-18  2:24 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Smith @ 2006-01-17 23:11 UTC (permalink / raw)
  To: zsh-users

I use the following function (which is probably more complex that
required) and wish to add nocorrect to it.  How would I do that
as in all the obvious (to me) places it does not seem to work.

function preexec {
local cmd
local application
cmd=(${(Q)${(z)3}})
    eval "function ${(q)cmd[1]} {
        unsetopt noglob
        cost ${(q)cmd[1]}" '$* 
        unfunction' "${(q)cmd[1]}
    }"
setopt noglob
}

Thanks
-- 
Eric Smith


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-18  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-17 23:11 Adding nocorrect to a preexec function Eric Smith
2006-01-18  2:24 ` Bart Schaefer

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).