Skip to content

Commit 195822d

Browse files
centdixclaude
andauthored
fix: register zsh completion for webmux (#102)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e3a8440 commit 195822d

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

bin/src/completions.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ describe("runCompletionCommand", () => {
116116
const spy = spyOn(console, "log").mockImplementation(() => {});
117117
const code = runCompletionCommand(["zsh"]);
118118
expect(code).toBe(0);
119-
expect(spy).toHaveBeenCalledWith(expect.stringContaining("#compdef webmux"));
119+
const output = spy.mock.calls[0]?.[0];
120+
expect(output).toContain("#compdef webmux");
121+
expect(output).toContain("compdef _webmux webmux");
122+
expect(output).not.toContain('_webmux "$@"');
120123
spy.mockRestore();
121124
});
122125

bin/src/completions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ _webmux() {
167167
esac
168168
}
169169
170-
_webmux "$@"`;
170+
compdef _webmux webmux`;
171171

172172
const BASH_SCRIPT = `_webmux() {
173173
local cur prev

0 commit comments

Comments
 (0)