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/21/23 3:53 PM, Grisha Levit wrote:
So to wait for a procsub after receiving a terminating signal, one
must do so in a trap for the signal itself and not in an EXIT trap.
Yes, that would probably work.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars l
On Tue, Mar 21, 2023 at 3:28 PM Chet Ramey wrote:
>
> > Interestingly, if an external command or a subshell is executed after
> > the process substitution is started but prior to receipt of the
> > signal, the `wait' works fine:
> >
> > $ (trap 'wait $!; echo $?' EXIT; : <(:); (:); kill 0)
>
> Bec
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
On 3/19/23 11:10 PM, Grisha Levit wrote:
If an EXIT trap is executed after receipt of a terminating signal,
waiting on a process substitution within the trap can fail:
The terminating signal handler cleans up FIFOs and any running procsubs
before running the exit trap, which is the last thing i
On 3/19/23 9:02 PM, Grisha Levit wrote:
compgen's glob matching does not respect dotglob being turned on or
off unless some other globbing takes place between the setting being
changed and compgen being called:
Thanks for the report.
--
``The lyf so short, the craft so long to lerne.'' - Chauc
15 matches
Mail list logo