* quick question about user defined zle widgets
@ 1998-11-05 17:51 Greg Klanderman
1998-11-05 18:32 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Greg Klanderman @ 1998-11-05 17:51 UTC (permalink / raw)
To: Zsh list
Is it possible when defining a shell function as a user defined
widget to access the prefix argument?
Also, is there any way when calling a builtin widget to figure out
the status? For example, I'd like to do "zle complete-word" in my
widget and then determine if:
- it completed something
- there were no completions
- choices were listed
- choices had already been listed and it did nothing
thanks
Greg
(please copy me on replies)
have i mentioned yet that zsh is a thing of beauty?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: quick question about user defined zle widgets
1998-11-05 17:51 quick question about user defined zle widgets Greg Klanderman
@ 1998-11-05 18:32 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1998-11-05 18:32 UTC (permalink / raw)
To: greg, Zsh list
On Nov 5, 12:51pm, Greg Klanderman wrote:
} Subject: quick question about user defined zle widgets
}
} Is it possible when defining a shell function as a user defined
} widget to access the prefix argument?
I posted a patch to pass the prefix argument as a positional parameter,
but Zefram objects to using the positional parameters of widget functions
and so didn't include it in the release.
There are also several bugs (all of which I reported, search the archive)
involving widget functions that invoke others via the "zle" command, one
of which causes the prefix arg to get bizarre (usually very large) values.
} Also, is there any way when calling a builtin widget to figure out
} the status? For example, I'd like to do "zle complete-word" in my
} widget and then determine if:
}
} - it completed something
} - there were no completions
} - choices were listed
} - choices had already been listed and it did nothing
I believe my patch also arranges to return a sensible exit code from the
"zle" command based on the return of the widget that is called, but I
don't recall for certain and I think Zefram objected to this as well.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-11-05 18:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-05 17:51 quick question about user defined zle widgets Greg Klanderman
1998-11-05 18:32 ` 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).