Fix fish integration on older fishes#1563
Conversation
- On fish 3.3 the bash-style `$(...)` doesn't work, we should use `(...)` - Also quoting `"(moo)"` on older fishes gives a literal `moo` - The result of a `(subcommand)` is a single token, so no need to quote it, anyway Tested by making the change, executing `cargo run -- init fish --disable-up-arrow` and then executing that shell script on a system with fish 3.3, as well as 3.6 and observing both still work. Fixes atuinsh#1562.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
I couldn't think of a decent way of testing this, else I'd've tried to add a test to lock in the good behaviour. |
|
Ahhh I see So this was introduced intentionally in this PR, to fix multiline commands being squished onto one line: #1418 If there's no other way to workaround, we may have to switch on Fish version and drop multiline support for 3.3 |
|
Oh darn it :) I'll see what I can do on my side. Upgrading fish is not the easiest; in the server I'm using we're on the 22.04LTS version. |
|
This does seem challening: https://fishshell.com/docs/current/language.html#expand-command-substitution |
|
Now rephrased in a way that works in both fish 3.3.x and 3.6.x. The release notes for fish say that the new syntax Tested again locally on both 3.3 and 3.6. Please take another looks |
|
Lovely! Thank you so much |
$(...)doesn't work, we should use(...)"(moo)"on older fishes gives a literalmoo(subcommand)is a single token, so no need to quote it, anywayTested by making the change, executing
cargo run -- init fish > atuin.fishand then copying and source that script on a system with fish 3.3, as well as 3.6 and observing both still work.Fixes #1562.