Help us understand the problem. What is going on with this article?

fish 2.6.0 で setenv: Too many arguments エラーが出たとき

More than 1 year has passed since last update.

kiexで新しいバージョンのElixirをinstallしたところ途中でエラーがでた。

$ kiex install 1.5.1
Downloading elixir version 1.5.1
Installing elixir version 1.5.1
Switched to branch 'master'
...
...

Installed Elixir version 1.5.1
Load with:
           kiex use 1.5.1
or load the elixir environment file with:
   source $HOME/.kiex/elixirs/.elixir-1.5.1.env.fish

$ kiex use 1.5.1
To switch elixir versions for your current shell run:
   source $HOME/.kiex/elixirs/.elixir-1.5.1.env.fish

$ source $HOME/.kiex/elixirs/.elixir-1.5.1.env.fish
setenv: Too many arguments # これです!

調べて見ると setenvset -gxに変更するといいっぽい。

.elixir-1.5.1.env.fish
#'setenv'を'set -gx'に変更

- setenv ELIXIR_VERSION 1.5.1
- setenv PATH $HOME/.kiex/elixirs/elixir-1.5.1/bin $PATH
- setenv MIX_ARCHIVES $HOME/.kiex/mix/archives/elixir-1.5.1
+ set -gx ELIXIR_VERSION 1.5.1
+ set -gx PATH $HOME/.kiex/elixirs/elixir-1.5.1/bin $PATH
+ set -gx MIX_ARCHIVES $HOME/.kiex/mix/archives/elixir-1.5.1

これでしっかり新しいバージョンへ

$ source $HOME/.kiex/elixirs/.elixir-1.5.1.env.fish
$ kiex list

kiex elixirs

   elixir-1.4
   elixir-1.4.4
=* elixir-1.5.1

# => - current
# =* - current && default
#  * - default

[追記]
あとで調べたらkiexの方ですでに修正されてた。普通にkiexをアップデートすればいいっぽい。
Fix fish 2.6 compatibility (https://github.com/taylor/kiex/commit/674c513074a084fd2e006aea84cbaf1157fb8998)

$ kiex selfupdate
hkwid
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした