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

[ feature request ] Support fish shell #1173

Open
yonas opened this issue Mar 13, 2024 · 4 comments
Open

[ feature request ] Support fish shell #1173

yonas opened this issue Mar 13, 2024 · 4 comments
Assignees
Labels
enhancement Improvement to existing functionality team-cli Tickets relevant to the flox CLI team

Comments

@yonas
Copy link

yonas commented Mar 13, 2024

Describe the bug:

It appears the fish shell is not supported.

Steps to reproduce:

  1. flox init
  2. flox install hello
  3. flox activate

Result:

❌ ERROR: Unsupported shell "/usr/bin/fish"

@yonas yonas added the bug Something isn't working label Mar 13, 2024
@ghudgins ghudgins added the team-cli Tickets relevant to the flox CLI team label Mar 13, 2024
@vrnvu
Copy link

vrnvu commented Mar 14, 2024

Hello, I've encountered the same issue and did some quick research in case anyone is wondering only bash and zsh are currently supported:

enum ShellType {

@yonas yonas changed the title ❌ ERROR: Unsupported shell "/usr/bin/fish" [ feature request ] Support fish shell Mar 14, 2024
@ysndr ysndr added enhancement Improvement to existing functionality and removed bug Something isn't working labels Mar 14, 2024
@ysndr
Copy link
Contributor

ysndr commented Mar 14, 2024

Hej, we are aware of the missing fish support and planning to work on it.
In the meantime you can export either FLOX_SHELL=<path to bash or zsh> to override the shell Flox uses for activation.

fish > export FLOX_SHELL=zsh
fish > flox activate 
zsh > ...

you can also have it exec a fish shell one again though aliases set in hooks would be unavailable:

FLOX_SHELL=zsh flox activate -- fish # I'm aware of the irony here :D

Mind though that "support" includes setting a prompt that shows the currently active environments, which we do not have in fish. (active environments can still be checked by inspecting e.g. $FLOX_PROMPT_ENVIRONMENTS)

@ghudgins
Copy link
Contributor

ghudgins commented Mar 20, 2024

parts of this work:

  • generate an activation script for fish
  • add manifest shell-specific section
  • nice to have: language-specific flox init would need to generate shell specific scripts instead of using common
  • prompting
  • add / update tests
  • documentation

@stahnma
Copy link
Contributor

stahnma commented Apr 19, 2024

This is blocked PR #1299.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing functionality team-cli Tickets relevant to the flox CLI team
Projects
None yet
Development

No branches or pull requests

6 participants