help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run a complete -F function inside HERE document?


From: alex xmb ratchev
Subject: Re: run a complete -F function inside HERE document?
Date: Sun, 16 Apr 2023 23:22:43 +0200

.. maybe none my cases match your case .. i realized late u wanted as u
wrote , inside heredoc ..

On Sun, Apr 16, 2023, 20:46 Britton Kerin <britton.kerin@gmail.com> wrote:

> I'd like to be able to generate completion candidates inside a HERE
> document.  Unfortunately this doesn't work:
>
> $ complete -r cat
> $ complete -F myfunc cat
> $ cat <<END_CAT_INPUT
> foo[TAB here should fire myfunc but doesn't]
> END_CAT_INPUT
>

1.st the input handling is passed to the process , cat
maybe u want cat input in the end substituted with the wanted ? there u can
use aliases with space at the end , to assign the different keywords to
expand

~ $ alias 0='v=( ' 1=11\  2=22\  3=33\  00=' ) ;'
~ $ 0 1 3 00 declare -p v
declare -a v=([0]="11" [1]="33")

Is there any way to get completion to fire in this context?
>

i dunno complete at all

i doubt the following will be much of use

{ var=$( </proc/$BASHPID/fd/0 ) ; } <<<bla

Britton
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]