You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated how Bashly generates Bash completions, through Completely.
This is a substantial overhaul, but it is intended to be backwards compatible.
If your Bashly project uses Bash completions, I would love your help testing the new implementation and reporting anything that looks wrong.
You can install the Bashly prerelease with:
gem install bashly --pre
This prerelease depends on a prerelease of Completely, so the matching completion generator should be installed automatically.
What changed
Generated completion scripts are now position-sensitive instead of simple list-based completions.
Generated completions no longer re-offer flags that were already provided.
Positional args can now be completed according to their position.
Positional args with allowed will include those values in the generated completions.
Args now support their own completions list:
args:
- name: pathhelp: File or directory to processcompletions:
- <file>
- <directory>
Command-level completions is still supported for backwards compatibility, but is no longer the recommended way to define positional-arg completions:
commands:
- name: viewhelp: View a directory, system user, or git branchcompletions:
- <directory>
- <user>
- $(git branch 2> /dev/null)
What needs real world testing
Completion generation on existing Bashly projects should produce useful, functional Bash completions.
Args and flags with allowed or completions should suggest those values in the right place.
Existing command-level completions should still work for positional args that do not define their own allowed or completions.
If you test this, please comment with your Bashly version, shell/Bash version, and a small config snippet or reproduction if something does not behave as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I have updated how Bashly generates Bash completions, through Completely.
This is a substantial overhaul, but it is intended to be backwards compatible.
If your Bashly project uses Bash completions, I would love your help testing the new implementation and reporting anything that looks wrong.
You can install the Bashly prerelease with:
This prerelease depends on a prerelease of Completely, so the matching completion generator should be installed automatically.
What changed
Generated completion scripts are now position-sensitive instead of simple list-based completions.
Generated completions no longer re-offer flags that were already provided.
Positional args can now be completed according to their position.
Positional args with
allowedwill include those values in the generated completions.Args now support their own
completionslist:Command-level
completionsis still supported for backwards compatibility, but is no longer the recommended way to define positional-arg completions:What needs real world testing
allowedorcompletionsshould suggest those values in the right place.completionsshould still work for positional args that do not define their ownallowedorcompletions.If you test this, please comment with your Bashly version, shell/Bash version, and a small config snippet or reproduction if something does not behave as expected.
Related PRs
Beta Was this translation helpful? Give feedback.
All reactions