Dear maintainer,
This patch adds a small bash-completion script for switchconf. It completes the first positional argument with scenario names, taken from directory names under /etc/switchconf (each scenario is a directory). This improves usability by enabling TAB-completion of available scenarios.
I am attaching the completion script (switchconf_completion.sh). Please consider including it in the package (e.g. install to /etc/bash_completion.d/switchconf) so users receive it automatically.
Behavior summary:
Completes only the first positional argument.
Lists immediate subdirectories of /etc/switchconf (no trailing slash).
Safe: no output if /etc/switchconf is missing or empty.
No dependency changes required.
Tested steps:
Place the file in /etc/bash_completion.d/switchconf and source it (or open a new bash).
Create a scenario directory: mkdir -p /etc/switchconf/example
Type: switchconf <TAB><TAB> — "example" should be proposed.
Best regards,
Carlo