-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add builder tab-completion script #12296
base: master
Are you sure you want to change the base?
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
local _builder_opts=() | ||
for e in "${!_builder_params[@]}"; do | ||
if [[ $e =~ ^-- ]]; then | ||
_builder_opts+=(${e%+*}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes all +
suffixes from options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes all
+
suffixes from options.
This should be a code comment
98c475e
to
e6fb213
Compare
Accidentally put a commit on the wrong branch for a moment; undid that via a |
Hmm... looks like macOS's This may provide a useful first step: https://stackoverflow.com/a/8492043 |
I would like to review this before it is merged. However this week I am at capacity. I am happy to take on making any updates and merge, as @jahorton will be away. |
This adds a new resource script -
${KEYMAN_ROOT}/resources/builder_completion.sh
. When sourced by a terminal's.bashrc
or similar, this script performs tab-completion for any of our builder-based scripts (namedbuild.sh
ortest.sh
), expanding for any supported matching actions, targets, and options.Example use case - autocompleting a paired action:target command
To do this, it also adds a hidden option to builder scripts currently called
--builder_completion_describe
, which enumerates all actions, then targets, then options in a format easily parsed by the completion script.Autocompletion from empty-string
@keymanapp-test-bot skip