Completions integration - #3978
Merged
Merged
Conversation
Add completions/meson.build (update-completions and check-completions run_targets plus the shell test suites), a Check completions CI workflow that fails on drift, and document the regeneration process in CONTRIBUTING.md and completions/README. Signed-off-by: Jim Munn <jlmunn@micron.com>
Refresh the committed bash, zsh, and PowerShell completions so they match the current CLI and pass the check-completions gate. Signed-off-by: Jim Munn <jlmunn@micron.com>
Collaborator
|
Looks good. Could also move these two instruction from install_data(
'completions/bash-nvme-completion.sh',
rename: 'nvme',
install_dir: datadir / 'bash-completion/completions',
)
install_data(
'completions/_nvme',
install_dir: datadir / 'zsh/site-functions',
)Then completion related stuff is in one meson.build file. |
Relocate the bash and zsh install_data rules from the top-level meson.build so all completion-related build logic lives in one file. Signed-off-by: Jim Munn <jlmunn@micron.com>
Collaborator
Author
|
@igaw , good idea on moving the meson instructions. I've done that and committed. By the way, I will be out next week. If there are any other minor changes you want and you don't want to wait, you may want to make them yourself. I'll be back on Monday, September 14th. |
Collaborator
|
Thanks! Enjoy! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the completion generator into meson and adds a CI gate so the committed bash/zsh/PowerShell scripts can't silently drift from the CLI.
meson compile -C <dir> update-completionsregenerates the committedbash-nvme-completion.sh,_nvme, andnvme-completion.ps1from the builtnvmebinary;check-completionsruns the same generation read-only.check-completionsand fails when the committed files are out of sync.CONTRIBUTING.mdandcompletions/README(Linux/all-plugins build required — reduced-Dplugins=builds omit commands).Design note — why two targets instead of the accessor pattern: I used two direct targets,
update-completionsandcheck-completions, so neither needs a build option or reconfigure. The accessor generator needs its configure-time boolean (-Dcheck-accessors=true) because it flips several targets at once; completions generate in one step, so a dedicated check target is simpler.