From c7d0431f10b0758314bf14cbd80834c0e410c797 Mon Sep 17 00:00:00 2001 From: vncntt Date: Tue, 13 Jan 2026 22:35:13 -0800 Subject: [PATCH 1/2] Add fish shell support and fix PATH handling for Claude 1. Fish shell support (install.sh): - Add ccind to fish_user_paths for fish shell users - Uses universal variable so it persists without config.fish modification 2. PATH handling (bin/ccind): - Check both PATH and ~/.local/bin when detecting Claude - Claude's installer places the binary in ~/.local/bin which may not be in PATH - Launch claude with PATH explicitly including ~/.local/bin Co-Authored-By: Claude Opus 4.5 --- bin/ccind | 12 +++++++++--- install.sh | 8 +++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/ccind b/bin/ccind index ccf36b0..67efb1a 100755 --- a/bin/ccind +++ b/bin/ccind @@ -113,8 +113,13 @@ else --additional-features "$ADDITIONAL_FEATURES" fi +# Helper to check if claude is available (checks both PATH and ~/.local/bin) +claude_available() { + devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude || test -x "$HOME/.local/bin/claude"' &> /dev/null +} + # Check if claude is available in the container -if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude' &> /dev/null; then +if ! claude_available; then if prompt_rebuild; then echo_info "Rebuilding container..." devcontainer up \ @@ -128,13 +133,14 @@ if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claud fi # Verify claude is available before launching -if ! devcontainer exec --workspace-folder "$WORKSPACE" bash -c 'command -v claude' &> /dev/null; then +if ! claude_available; then echo_error "Claude Code CLI still not found after rebuild. Please check for errors above." exit 1 fi # Launch Claude Code interactively +# Use PATH that includes ~/.local/bin since Claude installs there echo_info "Launching Claude Code..." exec devcontainer exec \ --workspace-folder "$WORKSPACE" \ - claude + bash -c 'export PATH="$HOME/.local/bin:$PATH"; exec claude' diff --git a/install.sh b/install.sh index 971a0c7..a53c779 100755 --- a/install.sh +++ b/install.sh @@ -25,8 +25,14 @@ for rc_file in ~/.bashrc ~/.zshrc; do fi done +# Add to fish shell (fish_user_paths is universal, doesn't require config.fish) +if command -v fish &> /dev/null; then + fish -c "set -Ua fish_user_paths '$CCIND_HOME/bin'" 2>/dev/null || true + echo "Added ccind to fish PATH (via fish_user_paths)" +fi + echo "" echo "Installation complete. Please restart your terminal or run:" -echo " source ~/.bashrc # or ~/.zshrc" +echo " source ~/.bashrc # or ~/.zshrc (fish users: path is set automatically)" echo "" echo "Then run 'ccind --help' to get started." From f06d6f15d325a70a92a9b5fb99dbae865ca86f05 Mon Sep 17 00:00:00 2001 From: vncntt Date: Tue, 13 Jan 2026 22:42:33 -0800 Subject: [PATCH 2/2] Simplify PATH setting to idiomatic shell pattern Use `PATH=... command` instead of `export PATH=...; exec command`. This is more idiomatic - prefixing a command with VAR=value sets it only for that command invocation. Co-Authored-By: Claude Opus 4.5 --- bin/ccind | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ccind b/bin/ccind index 67efb1a..05b89e2 100755 --- a/bin/ccind +++ b/bin/ccind @@ -143,4 +143,4 @@ fi echo_info "Launching Claude Code..." exec devcontainer exec \ --workspace-folder "$WORKSPACE" \ - bash -c 'export PATH="$HOME/.local/bin:$PATH"; exec claude' + bash -c 'PATH="$HOME/.local/bin:$PATH" claude'