Conversation
|
@tivris have you tried this PR? Does it work? Too big of a PR to review 🙈. |
Port the existing zsh shell plugin to fish shell, covering all
commands, tab completion, right prompt, fzf pickers, session state
management, and background sync.
Fish-side (fish-plugin/):
- conf.d/forge.fish: init, variables, key bindings (Enter/Tab)
- 54 function files: dispatcher, actions, helpers, completion
- Theme with fish_right_prompt integration
- Doctor diagnostics and keyboard shortcut reference
- Setup template for config.fish injection
Rust-side (crates/forge_main/src/fish/):
- FishCommandGroup with plugin/theme/doctor/rprompt/setup/keyboard
- FishRPrompt using ANSI escapes (vs zsh's %F{} prompt escapes)
- Plugin generation embedding fish-plugin/ via include_dir
- Setup targeting ~/.config/fish/config.fish with XDG support
- clap_complete::shells::Fish for CLI completions
Tested with fish 4.6.0, all 57 scripts pass fish -n syntax
validation, 27 Rust tests pass.
Closes tailcallhq#2765
Add missing else branches to remove HOME and XDG_CONFIG_HOME when they weren't set before the test, preventing test pollution.
fish's command substitution () splits output on newlines, so eval (forge fish plugin) collapses the entire script into a single line, breaking if/end block parsing. Pipe to source instead.
7e5f506 to
0091180
Compare
Tested it locally with fish 4.6.0 on macOS (Ghostty). Setup, plugin loading, theme, completions, key bindings, and : commands all work, ran |
test_run_fish_doctor_streaming mutates FORGE_SKIP_INTERACTIVE without holding the shared mutex, unlike every other env-mutating test in the file. Acquire ENV_LOCK to prevent concurrent test interference.
|
Related to #2839 A thought:
This way we don't need to bloat our repos/releases and we can support them independently. |
|
Desperately waiting for this feature. |
I’ve been experimenting with a possible unofficial fish shell integration on my side. It tries to mirror the general approach of the existing zsh integration, but it’s still very early and likely incomplete. Sharing in case it helps inform how external shell integrations might be structured: |
|
Action required: PR inactive for 5 days. |
Full port of the zsh shell plugin to fish, giving fish users the same
:commandexperience.What's included
Fish scripts (
fish-plugin/, 57 files)::command [args]and routes to action handlers:commands(via fzf) and@[file]references (via fd/bat)config.fishinjectionRust integration (
crates/forge_main/src/fish/, 4 files):FishCommandGroupwithplugin,theme,doctor,rprompt,setup,keyboardsubcommandsFishRPromptusing ANSI escapes instead of zsh's%F{}prompt escapesinclude_dir!embedding +clap_complete::shells::Fish~/.config/fish/config.fishwithXDG_CONFIG_HOMEsupportUsage
Testing
.fishfiles passfish -nsyntax validation (tested on fish 4.6.0)_forge_*functions register, logging/doctor work end-to-endCloses #2765