mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[GH-ISSUE #165] poor fish shell support/documentation #740
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#740
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @piotrgo on GitHub (Jul 6, 2016).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/165
I'm using fish shell and have encountered a problem where "prompt/theme isn't working during recording". There's a section in FAQ that suggest setting up custom command to run in the config:
I've tried doing so, but with no luck.
Then I decided to poke around the source, and in terminal/terminal.go I've found this:
As you can see the command to run is actually always a subcommand executed in sh. I assume this is ok, as long as you use bash or any other POSIX compliant shell, but that's not the case with fish.
I've changed that bit to
cmd := exec.Command("/usr/local/bin/fish", "-c", command), compiled it, passed the tests and it works like a charm!Now, I am new to Go but I'd be happy to take a shot on adding another config value to enable fish support, but before I even start it would be good to know if that would be even considered as a feature :-)
@ku1ik commented on GitHub (Jul 6, 2016):
Hey, it's probably best to not do any more work in the current Go codebase as I'll be releasing new version of asciinema written in Python (https://github.com/asciinema/asciinema/tree/p3) very soon. It's based on the original asciinema implementation (version 0.9.8 to be specific).
Anyway, the new code for running the command is here:
github.com/asciinema/asciinema@61feb5908d/asciinema/recorder.py (L17)I really don't understand why the current solution doesn't work. I am using fish shell myself and didn't notice anything broken (I don't use custom command though so
/usr/local/bin/fishis used).If we expand it to the full command it would be:
or in your case:
Why wouldn't
shstartfishas a login shell here?@piotrgo commented on GitHub (Jul 6, 2016):
I think there's no real issue actually. I was playing with it late at night. After your reply I went back to using version from brew and it works as expected :-) I think the reason why I though there's an issue was that I also played with fish functions pretty much at the same time.
At least I had a go at trying to understand go code.
Sorry if I wasted your time.
Cheers,
Piotr
@ku1ik commented on GitHub (Jul 6, 2016):
No prob, I'm glad you figured it out 👍