* Interesting tidbit about bash completion
@ 2003-02-28 9:53 John Buttery
2003-02-28 11:09 ` Oliver Kiddle
0 siblings, 1 reply; 2+ messages in thread
From: John Buttery @ 2003-02-28 9:53 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 315 bytes --]
Just saw this in the "bash programmable completion" freshmeat projects
update:
# bash completion is now compatible with the new bash completion
# emulation feature of zsh.
What does this mean (if anything) to us?
--
John #
Buttery # Is that the cat?
www.io.c# -- Jessie Scarlett
om/~john#
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Interesting tidbit about bash completion
2003-02-28 9:53 Interesting tidbit about bash completion John Buttery
@ 2003-02-28 11:09 ` Oliver Kiddle
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2003-02-28 11:09 UTC (permalink / raw)
To: John Buttery; +Cc: zsh-users
On 28 Feb, you wrote:
>
>
> Just saw this in the "bash programmable completion" freshmeat projects
> update:
>
> # bash completion is now compatible with the new bash completion
> # emulation feature of zsh.
>
> What does this mean (if anything) to us?
The change is little more than changing a few ugly bashisms like:
if [ ${BASH_VERSINFO[1]} '>' 04 ]; then
to:
if [[ ${BASH_VERSINFO[1]} > 04 ]]; then
I sent them a patch to do that to save me the hassle of having to modify
/etc/bash_completion before sourcing it from zsh.
If anyone is interested, I use this function to source it:
bash_source() {
alias shopt=':'
alias _expand=_bash_expand
alias _complete=_bash_comp
emulate -L sh
setopt kshglob noshglob braceexpand
source "$@"
}
This is only useful for testing bashcompinit because it will override
lots of zsh completions. You could alias around all zsh functions with:
for f in ${(kM)functions:#_*}; alias $f=_bash_$f
and then use:
alias compdef='compdef -n'
when running bashcompinit (so don't use the -U option to autoload)
I could perhaps put _bash_source in bashcompinit and add a -n option so
that it uses compdef -n.
Oliver
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-28 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 9:53 Interesting tidbit about bash completion John Buttery
2003-02-28 11:09 ` Oliver Kiddle
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).