help-bash
[Top][All Lists]
Advanced

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

Possible to easily get completions for a given command line?


From: Tim Landscheidt
Subject: Possible to easily get completions for a given command line?
Date: Tue, 27 Feb 2024 14:59:04 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

Hi,

I want to test consistency between a completion function and
a program's internal options (in this case
https://github.com/rpm-software-management/mock/blob/main/mock/etc/bash_completion.d/mock
and mock's "-r" option).

The completion code could be refactored to allow easier
tests, but for simplicity and maintainability I would really
just like to ask Bash: "What completions are there if I type
in 'mock -r ' and press TAB?" and get a list of completions.

Is this in any way possible with Bash (5.2.26)?

Tim



reply via email to

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