Skip to content

feat(cli): add custom command support in zsh and non interactive mode#1851

Merged
tusharmath merged 22 commits intomainfrom
feat/custom-commands-in-zsh
Nov 9, 2025
Merged

feat(cli): add custom command support in zsh and non interactive mode#1851
tusharmath merged 22 commits intomainfrom
feat/custom-commands-in-zsh

Conversation

@amitksingh1490
Copy link
Copy Markdown
Contributor

@amitksingh1490 amitksingh1490 commented Nov 6, 2025

No description provided.

- Add --custom-command flag to CLI for executing custom commands
- Implement command parsing with template substitution in UI
- Update zsh plugin to recognize custom commands vs agents
- Enhance zsh completion and syntax highlighting for extended command names
- Add comprehensive tests for custom command functionality
@amitksingh1490 amitksingh1490 changed the title Add custom command support with --custom-command flag feat: add custom command support in zsh Nov 6, 2025
@github-actions github-actions Bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Nov 6, 2025
Comment thread shell-plugin/forge.plugin.zsh Outdated

# Check if it's a built-in command first (fastest check)
case "$name" in
info|env|provider|model|new|dump|conversation|retry|compact|tools|ask|plan)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo run -- list commands --porcelain              

Should show a col for built-in and custom

@amitksingh1490 amitksingh1490 changed the title feat: add custom command support in zsh feat(cli): add custom command execution with --custom-command flag Nov 7, 2025
amitksingh1490 and others added 3 commits November 7, 2025 19:40
Use zsh's native parameter expansion for command lookup instead of external grep process.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Comment thread crates/forge_main/src/cli.rs Outdated
/// enabling proper handling of custom commands with template substitution
/// and parameter extraction. The slash prefix is optional.
#[arg(long, hide = true)]
pub custom_command: Option<String>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forge -p "Hi" --agent  muse --run fixme

Confusing for the user, which command will execute?

@amitksingh1490 amitksingh1490 changed the title feat(cli): add custom command execution with --custom-command flag feat(cli): add --custom-command flag for direct command execution Nov 8, 2025
@amitksingh1490 amitksingh1490 changed the title feat(cli): add --custom-command flag for direct command execution feat(cli): add --run flag for direct command execution Nov 8, 2025
@amitksingh1490 amitksingh1490 changed the title feat(cli): add --run flag for direct command execution feat(cli): add custom command support in zsh and non interactive mode Nov 8, 2025
@tusharmath tusharmath merged commit edf81b6 into main Nov 9, 2025
9 checks passed
@tusharmath tusharmath deleted the feat/custom-commands-in-zsh branch November 9, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants