claude-memory/graph/decisions/fish-bash-hybrid-shell-strategy-fish-interactive-bash-for-sc-66bac9.md
2026-03-01 16:02:49 -06:00

2.7 KiB

id type title tags importance confidence created updated relations
66bac9cf-1b1e-42f5-903d-d28a9d5e1e1a decision Fish + bash hybrid shell strategy: fish interactive, bash for scripts/tools
fish
bash
shell
claude-code
architecture
decision
homelab
shell-config
nobara
0.6 0.8 2026-02-27T05:33:08.745935+00:00 2026-03-01T22:02:48.107795+00:00
target type direction strength edge_id
055aea5f-7084-48ae-a096-69ee1c35e114 REQUIRES incoming 0.9 a9f8ae4a-0ec1-429b-9161-73d3978b2a37
target type direction strength edge_id
c292afbb-9b99-4628-8836-7a8d00c797e5 RELATED_TO incoming 0.65 0115d2f7-d73a-404b-ad3c-d44647d5c1b7
target type direction strength edge_id
5f31ea7f-9b53-427d-b601-ab98dabaa2e3 FOLLOWS incoming 0.8 e51c5c3a-fc29-499c-8e3f-2d185014d780
target type direction strength edge_id
acfad6b5-9a2c-4e51-9525-04b4c4112e69 BUILDS_ON incoming 0.9 a77fc3a3-fc45-4ea6-9a1a-2b4eb80eba64
target type direction strength edge_id
fba35b41-aced-4f74-ae01-dfa062df0764 RELATED_TO incoming 0.9 5dee8386-3a39-414a-8acc-ddf551cc8924

Fish + Bash Hybrid Shell Strategy

Decision

Use fish as the interactive shell for its superior autocompletion and syntax highlighting, while keeping bash as the script executor for all tooling.

Implementation

Set set -x SHELL /bin/bash inside fish's config.fish. This makes $SHELL report /bin/bash to any tool that checks it (Claude Code, scripts, CI helpers) even though the interactive session is running under fish.

Rationale

  • Fish provides excellent interactive UX: autosuggestions, syntax highlighting, smart completions — out of the box, no plugins needed
  • Fish is POSIX-incompatible, so it cannot safely be used as a script executor
  • Bash is the lingua franca for scripts — universally compatible, no subtle edge cases
  • Zsh was considered as alternative (nearly POSIX-compatible + plugins like zsh-autosuggestions + zsh-syntax-highlighting), but "nearly" POSIX-compatible creates subtle issues and requires plugin management overhead

Affected Tools

  • Claude Code Bash tool: uses $SHELL → gets bash, works correctly
  • Shell scripts with #!/bin/bash: unaffected by interactive shell choice
  • Starship prompt: works identically in fish, zsh, bash

Trade-offs

  • Fish config syntax (set -x VAR val, if status is-interactive) must be learned — it is not bash-compatible
  • Two shell configs to potentially maintain (~/.config/fish/config.fish for interactive, and any bash rc for login/script contexts)
  • Benefit: interactive experience is dramatically better than plain zsh without plugins