Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #220914 > unrolled thread

completion prompting

Started bygrumpy@mailfence.com
First post2020-04-05 14:40 +0200
Last post2020-04-06 14:40 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  completion prompting grumpy@mailfence.com - 2020-04-05 14:40 +0200
    Re: completion prompting Andrei POPESCU <andreimpopescu@gmail.com> - 2020-04-05 14:50 +0200
    Re: completion prompting <tomas@tuxteam.de> - 2020-04-05 15:00 +0200
      Re: completion prompting grumpy@mailfence.com - 2020-04-05 15:30 +0200
        Re: completion prompting Greg Wooledge <wooledg@eeg.ccf.org> - 2020-04-06 14:40 +0200

#220914 — completion prompting

Fromgrumpy@mailfence.com
Date2020-04-05 14:40 +0200
Subjectcompletion prompting
Message-ID<zScJc-5Pi-21@gated-at.bofh.it>
with bash completion returns a message like
Display all 129 possibilities? (y or n)
how can i turn this off

[toc] | [next] | [standalone]


#220917

FromAndrei POPESCU <andreimpopescu@gmail.com>
Date2020-04-05 14:50 +0200
Message-ID<zScSS-5SR-25@gated-at.bofh.it>
In reply to#220914

[Multipart message — attachments visible in raw view] — view raw

On Du, 05 apr 20, 14:31:06, grumpy@mailfence.com wrote:
> with bash completion returns a message like
> Display all 129 possibilities? (y or n)
> how can i turn this off
 
    man readline

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

[toc] | [prev] | [next] | [standalone]


#220918

From<tomas@tuxteam.de>
Date2020-04-05 15:00 +0200
Message-ID<zSd2x-5Wf-5@gated-at.bofh.it>
In reply to#220914

[Multipart message — attachments visible in raw view] — view raw

On Sun, Apr 05, 2020 at 02:31:06PM +0200, grumpy@mailfence.com wrote:
> with bash completion returns a message like
> Display all 129 possibilities? (y or n)
> how can i turn this off

I don't know what you mean by "turning this off".

The helper doing this is the readline library. Your shell picks
configuration for readline from the files /etc/inputrc and
~/.inputrc.

There is one variable which limits the maximum number of possible
completions shown (default is 100). The variable is called

  completion-query-items

So, if I understood you correctly, you might experiment with putting

  set completion-query-items 1000

in your file ~/.inputrc. Or you set it to a negative number, then
you're never asked (do at your own risk :-)

See bash's man page, section READLINE, and the readline man page.

But perhaps I didn't understand you correctly.

Cheers
-- t

[toc] | [prev] | [next] | [standalone]


#220919

Fromgrumpy@mailfence.com
Date2020-04-05 15:30 +0200
Message-ID<zSdvA-6ps-7@gated-at.bofh.it>
In reply to#220918
On Sun, 5 Apr 2020, tomas@tuxteam.de wrote:

> On Sun, Apr 05, 2020 at 02:31:06PM +0200, grumpy@mailfence.com wrote:
>> with bash completion returns a message like
>> Display all 129 possibilities? (y or n)
>> how can i turn this off
>
> I don't know what you mean by "turning this off".
>
> The helper doing this is the readline library. Your shell picks
> configuration for readline from the files /etc/inputrc and
> ~/.inputrc.
>
> There is one variable which limits the maximum number of possible
> completions shown (default is 100). The variable is called
>
>  completion-query-items
>
> So, if I understood you correctly, you might experiment with putting
>
>  set completion-query-items 1000
>
> in your file ~/.inputrc. Or you set it to a negative number, then
> you're never asked (do at your own risk :-)
>
> See bash's man page, section READLINE, and the readline man page.
>
> But perhaps I didn't understand you correctly.
>
> Cheers
> -- t
>

that's is exactly what i was attempting to say
if i am reading the man page correctly
there is not a very fine control
i wrote a script that runs in bash
i would like to disable prompting for only this script

$if my_script
set completion-query-items -1
$endif

but this does not work

[toc] | [prev] | [next] | [standalone]


#220997

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2020-04-06 14:40 +0200
Message-ID<zSzcK-2Li-19@gated-at.bofh.it>
In reply to#220919
On Sun, Apr 05, 2020 at 03:22:08PM +0200, grumpy@mailfence.com wrote:
> On Sun, 5 Apr 2020, tomas@tuxteam.de wrote:
> > So, if I understood you correctly, you might experiment with putting
> > 
> >  set completion-query-items 1000
> > 
> > in your file ~/.inputrc. Or you set it to a negative number, then
> > you're never asked (do at your own risk :-)

> i wrote a script that runs in bash
> i would like to disable prompting for only this script

What makes you think your script would USE this at all?  Are you running a
"read -e" command inside the script?

> 
> $if my_script
> set completion-query-items -1
> $endif

help bind

Probably something like    bind 'set ...'   but I have zero experience
with this.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web