aws / aws/amazon-q-developer-cli

Feature request: execute_bash tool should support shell customizations

Open
#2,242 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

## Description
The `execute_bash` tool currently runs commands in a non-interactive shell session, which means user-defined aliases, paths, etc. from `.zshrc`, `.bashrc`, and other shell configuration files are not loaded or available.

## Current Behavior
- User aliases defined in shell configuration files don't work
- Commands like `gst` (alias for `git status`) fail with "command not found"
- Users must use full commands instead of their familiar aliases
- Workaround requires using `zsh -i -c "command"` syntax

## Expected Behavior
The `execute_bash` tool should _optionally_ automatically load user shell configuration, making aliases, custom PATH modifications, and environment variables available without requiring workarounds.

## Steps to Reproduce
1. Define an alias in your shell configuration (e.g., `alias gst='git status'` in `.zshrc`)
2. Use the execute_bash tool with the alias: `execute_bash` with command `"gst"`
3. Observe that the command fails with "command not found"
4. Compare with running the same command in a normal terminal where the alias works

## Environment
- OS: macOS
- Shell: zsh
- Amazon Q CLI version: 1.12.3

## Impact
This affects user experience and productivity, as users cannot leverage their customized shell environments when working with the Q CLI tool.

## Suggested Solution
Load user shell configuration automatically when executing commands, or provide a configuration option to enable interactive shell mode for the execute_bash tool. This would be very helpful in using the Q CLI within a devcontainer in combination with the built-in dotfiles support feature.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.