Skip to content

Hide carapace internal command from completions#82

Closed
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-hide-carapace-command
Closed

Hide carapace internal command from completions#82
M09Ic wants to merge 1 commit into
reeflective:mainfrom
M09Ic:pr/console-hide-carapace-command

Conversation

@M09Ic

@M09Ic M09Ic commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Background

Carapace injects an internal _carapace command for shell completion plumbing. In an interactive console, that implementation detail should not be offered as a normal user command.

Approach

  • Hide _carapace recursively after carapace.Gen has initialized completion state.
  • Filter _carapace out while converting carapace values into readline completions.
  • Keep the change limited to the completion path.

Tests

  • Added a regression test with an explicit _carapace subcommand.
  • Verified the command is hidden and not returned as a completion value.
  • Ran go test ./...

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.06%. Comparing base (7002774) to head (f84bdda).

Files with missing lines Patch % Lines
completer.go 47.05% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
+ Coverage   22.54%   24.06%   +1.52%     
==========================================
  Files          27       27              
  Lines        2045     2057      +12     
==========================================
+ Hits          461      495      +34     
+ Misses       1554     1527      -27     
- Partials       30       35       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@maxlandon

Copy link
Copy Markdown
Member

Superseded by #87 (merged to main), which recommits this change signed with your authorship preserved, as part of a batch. Thanks @M09Ic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants