Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15490
| From | Муравьев Александр <amuravyev@s-terra.ru> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: compgen -F |
| Date | 2019-10-10 11:55 +0300 |
| Message-ID | <mailman.181.1570697731.9715.bug-bash@gnu.org> (permalink) |
| References | <1fc25922-4b79-1108-0147-90edd22d16e7@case.edu> <282a0b62-91e4-8e26-d592-fde4b86abbde@s-terra.ru> |
> What does `works' mean here,
It means to work like "compgen -c pin", or like
> _completion_loader ping; COMP_WORDS=(ping); COMP_CWORD=1;
> _known_hosts; declare -p COMPREPLY
or somehow else get possible completion results.
> and what are you trying to do with this patch?
I am trying to provide "pcomp_line" buffer which
"gen_compspec_completion" function expect to be. Normally when we just
press <TAB> after "ping ", "pcomp_line" is provided by
"programmable_completions" function (it assign the buffer pointer to
line buffer). This function is called from "attempt_shell_completion"
function according to special logic which it consists (it determines
whether programmable completion is needed).
On the other hand, "compgen" realization function ("compgen_builtin")
just set pcom_line buffer pointer to NULL. Consequently, no programmable
completion is possible in this case, because "pcomp_line" buffer is
necessary. The buffer is parsed in "gen_compspec_completions" in order
to bind variables like "COMP_WORDS", which are used in programmable
completions bash scripts in /usr/share/bash-completion/.
Hope I said clearly. It is second language for me.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: compgen -F Муравьев Александр <amuravyev@s-terra.ru> - 2019-10-10 11:55 +0300
csiph-web