store: Fish + bash hybrid shell strategy: fish interactive, bash for scripts/tools
This commit is contained in:
parent
ee453e5c53
commit
094189700b
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
id: 66bac9cf-1b1e-42f5-903d-d28a9d5e1e1a
|
||||||
|
type: decision
|
||||||
|
title: "Fish + bash hybrid shell strategy: fish interactive, bash for scripts/tools"
|
||||||
|
tags: [fish, bash, shell, claude-code, architecture, decision, homelab, shell-config, nobara]
|
||||||
|
importance: 0.6
|
||||||
|
confidence: 0.8
|
||||||
|
created: "2026-02-27T05:33:08.745935+00:00"
|
||||||
|
updated: "2026-02-27T05:33:08.745935+00:00"
|
||||||
|
---
|
||||||
|
|
||||||
|
# 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
|
||||||
Loading…
Reference in New Issue
Block a user