Skip to content

Fix/fish init wrapper#19

Open
mineiro wants to merge 2 commits intotobi:masterfrom
mineiro:fix/fish-init-wrapper
Open

Fix/fish init wrapper#19
mineiro wants to merge 2 commits intotobi:masterfrom
mineiro:fix/fish-init-wrapper

Conversation

@mineiro
Copy link
Copy Markdown

@mineiro mineiro commented Mar 4, 2026

Fixes Fish try behavior (create/clone + status) and updates README to the safer command try init ... setup.

mineiro added 2 commits March 4, 2026 18:20
Use `string collect` in the fish wrapper generated by `try init` so
multi-line output from `try exec` is evaluated as one script.

Also capture `pipestatus[1]` and return it on failure instead of relying
on `$status` from the pipeline tail.
Use `command try` in Fish init snippets so re-sourcing shell config
always calls the binary, not an already-defined `try` function.

This keeps setup idempotent and avoids recursion/weird behavior when
config.fish is sourced multiple times.
@kalin
Copy link
Copy Markdown

kalin commented Mar 5, 2026

Had same issue when switching from ruby to c version. Built from mineiro:fix/fish-init-wrapper and used the corrected init code and it worked as expected.

fish version 4.4.0
MacOS 15.7.4

The broken behaviour led to a lot of needless troubleshooting until I found this PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants