On 3/22/23 4:33 PM, Koichi Murase wrote:
Do you think calling `compgen', which
leaves the state of `compopt -o filenames', etc., outside the bindable
function `compete' would affect any behaviors?
That's more or less the question. It's not that compgen leaves modified
readline state outside a
2023年3月22日(水) 22:51 Chet Ramey :
> > I wouldn't say my usage is typical, but I do that in fact. I have a
> > shell function to do that for an arbitrary command (which I once
> > posted in help-bash [1] but now it's old. The latest is [2]) and use
> > it everywhere.
>
> So is your function suite dep
On 3/21/23 7:00 PM, Koichi Murase wrote:
2023年3月22日(水) 6:00 Greg Wooledge :
I don't use programmable completion, but I could *imagine* someone using
a temp file to store the results, then using mapfile to read them back
in, to avoid the fork() that the command substitution uses.
I wouldn't say
2023年3月22日(水) 6:00 Greg Wooledge :
> I don't use programmable completion, but I could *imagine* someone using
> a temp file to store the results, then using mapfile to read them back
> in, to avoid the fork() that the command substitution uses.
I wouldn't say my usage is typical, but I do that in
On Tue, Mar 21, 2023 at 5:52 PM alex xmb ratchev wrote:
> On Tue, Mar 21, 2023, 22:42 Grisha Levit wrote:
>> Let's say you want to know if there are any entries starting with
>> `foo' in the current directory. You can do:
>
> i see , thank you sir
> i .. mostly dont have that case ( if existing
On Tue, Mar 21, 2023, 22:42 Grisha Levit wrote:
> On Tue, Mar 21, 2023 at 5:26 PM alex xmb ratchev
> wrote:
> > On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote:
> >>
> >> compgen -G 'foo/*' >/dev/null && COMPREPLY=(bar)
> >
> > i dont get that code at all , but i like idea of speedier file filli
On Tue, Mar 21, 2023 at 5:26 PM alex xmb ratchev wrote:
> On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote:
>>
>> compgen -G 'foo/*' >/dev/null && COMPREPLY=(bar)
>
> i dont get that code at all , but i like idea of speedier file filling .. can
> u explain some in short ?
Let's say you want to kn
On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote:
> On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote:
> > OK, say you did in fact run compgen in the foreground -- very unusual
> > because it's awkward to capture the possible completions that way -- to
> > generate completions.
>
> Sorry I should h
On Tue, Mar 21, 2023, 21:05 Grisha Levit wrote:
> On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote:
> > OK, say you did in fact run compgen in the foreground -- very unusual
> > because it's awkward to capture the possible completions that way -- to
> > generate completions.
>
> Sorry I should h
On Tue, Mar 21, 2023 at 04:52:03PM -0400, Grisha Levit wrote:
> On Tue, Mar 21, 2023 at 4:11 PM Chet Ramey wrote:
> > OK, which do you think would be the more common case? Wanting the options
> > used to generate completions to persist or using it in this way?
>
> Usually people do `COMPREPLY=($(
On Tue, Mar 21, 2023 at 4:11 PM Chet Ramey wrote:
> OK, which do you think would be the more common case? Wanting the options
> used to generate completions to persist or using it in this way?
Usually people do `COMPREPLY=($(compgen ...))' (or write to stdout in
a command specified with `complete
On 3/21/23 4:04 PM, Grisha Levit wrote:
On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote:
OK, say you did in fact run compgen in the foreground -- very unusual
because it's awkward to capture the possible completions that way -- to
generate completions.
Sorry I should have explained. I hit th
On Tue, Mar 21, 2023 at 3:47 PM Chet Ramey wrote:
> OK, say you did in fact run compgen in the foreground -- very unusual
> because it's awkward to capture the possible completions that way -- to
> generate completions.
Sorry I should have explained. I hit this issue because I was using
compgen i
On 3/19/23 10:08 PM, Grisha Levit wrote:
Completion state is not fully restored after invoking `compgen' within
a competition function.
Normally, if a compspec does not specifically include one of the
options that triggers filename completion, the generated completions
are not treated as filenam
Completion state is not fully restored after invoking `compgen' within
a competition function.
Normally, if a compspec does not specifically include one of the
options that triggers filename completion, the generated completions
are not treated as filenames:
$ complete -W '/tmp /var' cmd
$ cmd /[
15 matches
Mail list logo