Repository navigation
Fix filename completion for commands with path arguments - #13733
Merged
tanmay-hc merged 1 commit intoOct 27, 2026
Merged
Conversation
tanmay-hc
approved these changes
Oct 27, 2026
tanmay-hc
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for raising the PR. I've tested them and changes looks good to me.
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.
Description
Restore filename completion after
packer -autocomplete-installby usingcomplete.PredictFiles("*")for commands with positional path arguments instead ofcomplete.PredictNothingResolved Issues
Closes #12466
Validation
Reproduced the reported behavior with Packer 1.9.1 in interactive Bash 3.2.57 and 5.3.20 using the same
complete -Cregistration generated by the installerThe patched binary completes
packer build ubuntu-arm64.qemu<Tab>toubuntu-arm64.qemu.pkr.hclin both shells while preservingpacker bui<Tab>Passed locally with Go 1.26.10 on macOS arm64
go test ./command -run '^TestAutocompleteArgs$' -count=1TEST=./command/... VET=./command/... make testincluding vetgo build -o bin/packer .make fmtandmake fmt-checkmake ci-lintgit diff --cached --check-var-filevaluesUnfiltered
golangci-lint run ./command/...reports 90 existing findingsRunning the same check against a clean source snapshot of base commit
5f7680f77c9fcacff909f1dfdfa20113e03deee1produced the same 90 findings with no added or removed diagnosticsGitHub Actions currently reports
action_requiredfor both Go Test and Go Validate with no jobs executedRemote CI results are pending maintainer action
Cloud acceptance tests were not run
Code generation is not applicable because no configuration structs or generated sources changed
Rollback Plan
Revert this change
Changes to Security Controls
None