Wang1rrr opened a new pull request, #5144: URL: https://github.com/apache/rocketmq-dashboard/pull/5144
## Problem and change Shell completion currently offers no values for known contexts, catalog enum flags or output formats and falls back to unrelated filenames. This change completes those values from existing local configuration and catalog metadata, following the existing `explain` completion behavior. - Complete catalog string-enum fields and `--output` / `-o` without copying catalog value lists or mutating shared slices. - Complete `--context` and the first argument of `config set-context`, `use-context` / `use`, and `delete-context` / `delete`. Honor the normal config-path precedence; keep execution behavior unchanged. - Keep completion local and read-only: no credential resolution, HTTP, approval prompts, instance defaults or config writes. Suppress filesystem fallback for these values, filter control characters from candidate records, and retain file completion for `--config`. - Document setup for the four existing shells and check generated completion scripts. Relates to #5142. **Draft: the proposed scope is awaiting maintainer design feedback.** No maintainer approval is implied. ## Validation - `go test -count=1 ./...` passed: 64 top-level tests / 139 including subtests. The new completion coverage includes 7 top-level tests / 32 including subtests. - Tests exercise the real `__complete` path, enum/nested schema handling, prefixes, aliases, config precedence, missing/invalid config, Unicode/space/control-character names, read-only config, and no network/credential/stdin/confirmation access. - `gofmt`, `go vet ./...`, catalog `-check`, native build and cross-compilation for Linux/macOS/Windows on amd64/arm64 passed. - Seven before/after probes against independently built unchanged/final binaries confirm that known values now return candidates plus `NoFileComp`; existing `explain` completion is unchanged. The first unchanged test run used an unintended `/bin/bash` and failed packaging on Windows path handling. Prefixing the test process PATH with Git Bash fixed the environment; the full final suite, including packaging, passed without changing packaging code or tests. Race checks could not complete on this Windows host: `-race` first required CGO, and enabling CGO then failed because `gcc` is not installed. The four shell generators are tested; four native interactive-shell end-to-end sessions were not run. Independent PowerShell smoke checks loaded the generated completion script and exercised TabExpansion2 against the built executable: topic enum, output format, global context and context positional completion all returned the expected candidates (4/4). No persistent shell profile was modified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
