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


Groups > gnu.bash.bug > #14130 > unrolled thread

Re: [PATCH] Add nofirstword completion option

Started byLuca Boccassi <bluca@debian.org>
First post2018-05-23 10:44 +0100
Last post2018-05-23 10:44 +0100
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.


Contents

  Re: [PATCH] Add nofirstword completion option Luca Boccassi <bluca@debian.org> - 2018-05-23 10:44 +0100

#14130 — Re: [PATCH] Add nofirstword completion option

FromLuca Boccassi <bluca@debian.org>
Date2018-05-23 10:44 +0100
SubjectRe: [PATCH] Add nofirstword completion option
Message-ID<mailman.312.1527068663.1292.bug-bash@gnu.org>

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

On Sun, 2018-05-20 at 15:34 -0400, Chet Ramey wrote:
> On 5/18/18 7:06 AM, Luca Boccassi wrote:
> > Network operating systems traditionally have provided a command
> > line interface with "operation mode" and "configuration mode", with
> > different auto-completion behaviour - specifically, with a small
> > set
> > of supported commands that are printed using the auto-completion
> > shortcut key, depending on the mode.
> > In order to be able to implement such modes using Bash, Linux and
> > Free
> > Software, it's necessary to be able to optionally disable
> > auto-completion on the first word, so that the relevant help text
> > (depending on the mode) can be printed on the console instead.
> > Add and document a nofirstword completion option to implement this
> > feature.
> 
> I don't like this, and don't see it as having much general use. If
> this
> functionality is required, I would rather see it implemented as a
> programmable completion mode (and a new option to `complete') that
> can be
> used to auto-complete command names.
> 
> Chet

Hello Chet,

Thanks for your feedback!

So by that, do you mean that it's possible to stop autocompleting to
files/dirs/binaries just using a programmable completion script? Or did
I misunderstand? Apologies if that's the case.

Right now we do have completion scripts to implement the help text for
the commands (and for the empty set, which displays a general help with
a summary), what's missing is stopping files/dirs/binaries completion
for the first word, so that exclusively the commands are shown.

-- 
Kind regards,
Luca Boccassi

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web