opencode
opencode copied to clipboard
Shell ! command does not honour my local aliases
Description
So... I think that this used to work...
My local aliases do not work anymore when using ! command in opencode.
frosch ➜ /tmp which g
g: aliased to git
- MacOs
- ZSH
- oh-my-zsh
- Sourcing aliases from zshrc like this:
ZSH_CUSTOM=~/.config/zsh
OpenCode version
1.0.61
Steps to reproduce
- See above
Screenshot and/or share link
- See above
Operating System
- MacOs latest
Terminal
- Ghostty
- Zsh
This issue might be a duplicate of existing issues. Please check:
- #3479: Both issues are related to shell command execution not using the user's actual shell environment (zsh/bash) with their custom configurations like aliases. Issue #3479 identifies the root cause - OpenCode uses '/bin/sh' instead of the user's $SHELL environment, which doesn't load .zshrc/.bashrc files where aliases are defined.
Feel free to ignore if none of these address your specific case.