Skip to content

fix: enable file autocompletion for add-blob and vendor-package commands#697

Merged
aramprice merged 1 commit intocloudfoundry:mainfrom
rubionic:opencode-issue-695-1758792927
Oct 2, 2025
Merged

fix: enable file autocompletion for add-blob and vendor-package commands#697
aramprice merged 1 commit intocloudfoundry:mainfrom
rubionic:opencode-issue-695-1758792927

Conversation

@rubionic
Copy link
Copy Markdown
Contributor

Summary

  • Fix autocompletion for bosh add-blob command to enable file path completion
  • Fix autocompletion for bosh vendor-package command to enable directory path completion

Problem

The shell autocompletion feature for the BOSH CLI has a bug affecting release developers. Several commands used during release authoring do not autocomplete as expected:

  • bosh add-blob - should allow file/path autocompletion to find files to add as blobs
  • bosh vendor-package - should allow directory autocompletion to specify source package directories

Currently, these commands use the noFile complete function which prevents filesystem autocompletion.

Solution

Changed the completion function mapping for both commands from c.noFile to c.listFiles:

File: cmd/completion/complete_functions.go

  • Line 32: AddBlobArgs mapping changed from c.noFile to c.listFiles
  • Line 78: VendorPackageArgs mapping changed from c.noFile to c.listFiles

This allows users to:

  • Use bosh add-blob <tab> for filesystem autocompletion when selecting files
  • Use bosh vendor-package <tab> for filesystem autocompletion when selecting package directories

Testing

The fix enables standard shell autocompletion for file/directory paths when using these commands.

Fixes #695

- Change AddBlobArgs from noFile to listFiles completion
- Change VendorPackageArgs from noFile to listFiles completion
- Allows filesystem autocomplete when specifying file paths

Fixes cloudfoundry#695
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Sep 25, 2025

CLA Signed

  • ✅login: rubionic / name: Rubionic / (7df39a9)

The committers listed above are authorized under a signed CLA.

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Sep 26, 2025
@aramprice aramprice merged commit 0417792 into cloudfoundry:main Oct 2, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

Autocompletion uses the wrong function map for several commands

2 participants