Skip to content

bash-completion: Add initial draft - #106

Merged
mschwan-phytec merged 4 commits into
phytec:mainfrom
s-hemer:WIP/s_hemer@phytec.de/bash_completion
Nov 6, 2026
Merged

mschwan-phytec merged 4 commits into
phytec:mainfrom
s-hemer:WIP/s_hemer@phytec.de/bash_completion

Conversation

@s-hemer

@s-hemer s-hemer commented Nov 26, 2025 •

Copy link
Copy Markdown
Contributor

There may be some combinations of command/parameter/options that I am not 100% sure if they are valid (i.e. option after 'show PACKAGE'.

Won't complete option parameters like --debug-domains=DEBUG_DOMAINS or package --directory=DIR

@mschwan-phytec
mschwan-phytec self-requested a review December 3, 2025 10:58
@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch from 1d8cc2c to 6b654da Compare December 9, 2025 07:15
@s-hemer
s-hemer marked this pull request as ready for review December 9, 2025 07:18
@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch 2 times, most recently from a9a90ee to f43e7a3 Compare December 9, 2025 07:30
@s-hemer

s-hemer commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

For testing, copy to or create symlink in /etc/bash_completion.d/. Using personal .bash_completion/ folder in ${HOME} won't work for sudo.

@mschwan-phytec
mschwan-phytec force-pushed the main branch 2 times, most recently from 9ab6f72 to 41bf69f Compare January 15, 2026 08:06
@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch from f43e7a3 to 7a8556c Compare January 15, 2026 12:43
@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch from 7a8556c to f2f1116 Compare September 1, 2026 09:01
@mschwan-phytec

Copy link
Copy Markdown
Collaborator

Do you plan to continue on this PR? Would be a nice addition for the next 5.0.0 release, which may be released in Q4 '26 ... Q1 '27. 😉

@s-hemer

s-hemer commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

maybe the title is now misleading: I consider this quite usable (at least I am happily using it). Adding completion for further options should not be that big work. It suggests --debug-domains as an option but not which domain you may be able to choose, some for the --directory...
I mainly focused on my usecase of install. I see, I have to adopt the --version...

@mschwan-phytec

Copy link
Copy Markdown
Collaborator

Understood. If you rebase onto current master, resolve conflicts and add support for --version, I'd happily merge this.

@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch from f2f1116 to 0ad9137 Compare October 30, 2026 12:14
@s-hemer

s-hemer commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Rebased and fixed some minors, including the somehow broken stop of completion after help option(s).

All commands, options, and command parameters should be completed correctly.
Some option parameter won't complete.

Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
When test-building the package locally, these otherwise float the
untracked files.

Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
Version command is deprecated, so don't complete it anymore. Add the
version options instead (as a 'help_option' so no completion follows
which is not exactly how the parsing of partup works...).

Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
@s-hemer
s-hemer force-pushed the WIP/s_hemer@phytec.de/bash_completion branch from 0ad9137 to 3a9e256 Compare October 30, 2026 12:21
@mschwan-phytec
mschwan-phytec merged commit b99f82c into phytec:main Nov 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants