Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15490 > unrolled thread
| Started by | Муравьев Александр <amuravyev@s-terra.ru> |
|---|---|
| First post | 2019-10-10 11:55 +0300 |
| Last post | 2019-10-10 11:55 +0300 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: compgen -F Муравьев Александр <amuravyev@s-terra.ru> - 2019-10-10 11:55 +0300
| From | Муравьев Александр <amuravyev@s-terra.ru> |
|---|---|
| Date | 2019-10-10 11:55 +0300 |
| Subject | Re: compgen -F |
| Message-ID | <mailman.181.1570697731.9715.bug-bash@gnu.org> |
> 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 top | Article view | gnu.bash.bug
csiph-web