Skip to content

Fish shell integration is broken on older version of fish #5210

@melonedo

Description

@melonedo

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

Commands I ran and their output:

curl -fsSL https://pixi.sh/install.sh | sh

pixi info output:

System
------------
       Pixi version: 0.62.2
        TLS backend: rustls
           Platform: linux-64
   Virtual packages: __unix=0=0
                   : __linux=5.15.0=0
                   : __glibc=2.31=0
                   : __cuda=12.9=0
                   : __archspec=1=skylake
          Cache dir: /home/mlinux/.cache/rattler/cache
       Auth storage: /home/mlinux/.rattler/credentials.json
   Config locations: No config files found

Global
------------
            Bin dir: /home/mlinux/.pixi/bin
    Environment dir: /home/mlinux/.pixi/envs
       Manifest dir: /home/mlinux/.pixi/manifests/pixi-global.toml

Other files (e.g. script files, source files, etc.):

Issue description

Fish shell integration relies on fish_add_path, which is not available on older versions of fish (e.g. the version installed from apt on Ubuntu 20.04). This makes a new fish shell error.

pixi/install/install.sh

Lines 223 to 226 in ff58e6c

fish)
LINE="fish_add_path ${PIXI_BIN_DIR}"
update_shell ~/.config/fish/config.fish "$LINE"
;;

An alternative would be simply exporting to PATH, or modifying fish_user_paths manually by set -Ua fish_user_paths /home/mlinux/.pixi/bin and then remove ~/.config/fish/config.fish

Expected behavior

Work just like any other shell.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions