Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fish shell support #8

Open
joshmedeski opened this issue Dec 15, 2022 · 2 comments
Open

Add fish shell support #8

joshmedeski opened this issue Dec 15, 2022 · 2 comments

Comments

@joshmedeski
Copy link

I'm using the fish shell. So the eval code won't work as it.

fish: Unsupported use of '='. In fish, please use 'set NVIM_LISTEN_ADDRESS "/var/folders/_c/kc73b95n13jfp699sll4qfhr0000gn/T/tmux-nvr/YaeRSR"'.

I don't mind forking the plugin and adding fish support, is there a good approach for supporting multiple shell environments?

@joshmedeski
Copy link
Author

This works for me:

if test -n "$TMUX"
    eval (string replace "NVIM_LISTEN_ADDRESS=" "set -x NVIM_LISTEN_ADDRESS " (tmux show-environment -s NVIM_LISTEN_ADDRESS))
else
    set -x NVIM_LISTEN_ADDRESS /tmp/nvimsocket
end

I converted everything to fish compatible shell and had to do a string substitution to change to the fish way of setting variables.

Hope this helps someone else.

@carlocab
Copy link
Owner

I don't use fish, but I'm happy to look at a PR that adds support for fish!

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

No branches or pull requests

2 participants