taylor / kiex

Elixir version manager
http://taylor.github.io/kiex/
MIT License
782 stars 66 forks source link

fish-shell compatibility #50

Open douglascamata opened 8 years ago

douglascamata commented 8 years ago

fish-shell uses, like me, are very forgotten when it comes to libraries that needs to be loaded into the shell. It would be nice to see some integration here.

taylor commented 8 years ago

This was added in https://github.com/taylor/kiex/pull/33. Is there a problem with fish support?

douglascamata commented 8 years ago

I didn't see any documentation about this. The "tested shells" section in the README didn't mention fish-shell and there are no setup instructions for fish-shell specifically... so I assumed there's no support. Maybe documentation about it should be added?

taylor commented 8 years ago

@douglascamata pull request welcome :)

douglascamata commented 8 years ago

I'll see what I can do 👍

jfis commented 8 years ago

using

test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"

i got

Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
fish: test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"

then changing to

test -s "$HOME/.kiex/scripts/kiex.fish" and; source "$HOME/.kiex/scripts/kiex.fish"

i got

Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
~/.kiex/scripts/kiex (line 3):   && source $HOME/.kiex/scripts/kiex.csh \
                                  ^
from sourcing file ~/.kiex/scripts/kiex
called on standard input

i was able to get fish working by skipping scripts/kiex and pointing to scripts/kiex.fish directly

test -s "$HOME/.kiex/scripts/kiex.fish" and; source "$HOME/.kiex/scripts/kiex.fish"

everything but sub-shell worked for me after that

thanks for kiex!

zzztuzzz commented 8 years ago

THX!

taylor commented 8 years ago

The instructions shown during install will have to be updated for fish -- https://github.com/taylor/kiex/blob/master/kiex#L379. It is already done for some parts of the program such as https://github.com/taylor/kiex/blob/master/kiex#L379

I'll get fish setup in my test environment.

howdoicomputer commented 8 years ago

kiex use also doesn't work because kiex generates a bash compliant env file.

For my elixir version, I manually changed it to this:

$ cat elixir-1.3.4.env 
set -xg ELIXIR_VERSION 1.3.4
set -xg PATH $HOME/.kiex/elixirs/elixir-1.3.4/bin $PATH
set -xg MIX_ARCHIVES $HOME/.kiex/mix/archives/elixir-1.3.4
optikfluffel commented 7 years ago

Any updates on this?

carina-akaia commented 6 years ago

@jfis, I have an error in kiex.fish (at least for current fish version) I am corrected it for a little bit: test -s "$HOME/.kiex/scripts/kiex.fish"; and source "$HOME/.kiex/scripts/kiex.fish" Now everything is works. Just add above string to the ~/.config/fish/config.fish file Enjoy!

carina-akaia commented 6 years ago

maybe issue must be closed now?