opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Shell ! command does not honour my local aliases

Open madflow opened this issue 2 months ago • 1 comments

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
Image
  • 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

madflow avatar Nov 15 '25 14:11 madflow

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.

github-actions[bot] avatar Nov 15 '25 14:11 github-actions[bot]