Skip to content

Invoke the executable that generated the shell widget - #103

Merged
Gubarz merged 2 commits into
cheatmd-dev:mainfrom
echo8134:fix/widget-executable
Nov 25, 2026
Merged

Gubarz merged 2 commits into
cheatmd-dev:mainfrom
echo8134:fix/widget-executable

Conversation

@echo8134

Copy link
Copy Markdown
Contributor

Summary

Generated widgets hardcoded cheatmd and failed when the generator was invoked under another path or name. Generate shell-specific quoting for the current executable path while retaining the existing default library generators.

Related issues

No linked issue.

Verification

Generated scripts cover Bash, Zsh and Fish quoting. An actual Bash interaction invokes an executable path with spaces and an apostrophe. Zsh and Fish runtimes were unavailable.

Local checks passed on Go 1.27.1. The CI workflow uses Go 1.26.3.

Checklist

  • go build ./... and go test ./... pass
  • gofmt -l . and go vet ./... are clean
  • Added regression tests for the changed behavior
  • cheatmd --lint examples/ passes
  • Docs/wiki changes are not needed for this fix

@Gubarz
Gubarz force-pushed the fix/widget-executable branch from 170e204 to 36b8876 Compare November 25, 2026 06:50
@Gubarz
Gubarz marked this pull request as ready for review November 25, 2026 06:52
@Gubarz
Gubarz merged commit b2cbde5 into cheatmd-dev:main Nov 25, 2026
1 check passed
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