Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My company has default shell as zsh so every tool assumes that. How can I switch to fish in such an environment?


Isn’t the first line a shebang that would tell which she’ll to run it with?

`#! /usr/bin/env zsh`


You can execute zsh scripts from a fish command line, or any other. Where is the problem?


Fish doesn't source /etc/profile{,.d}, so it won't pickup additional PATHs and other env vars that packages set there, for example.

A workaround is launching it from .bashrc/.zshrc or terminal. https://wiki.archlinux.org/title/Fish#Setting_fish_as_intera...


Here’s some solutions, I’ve written a few scripts for projects to pass aws okta tokens. Absolutely worth it to use fish IME. YMMV depending on complexity https://superuser.com/questions/446925/re-use-profile-for-fi...


Doesn’t sound like it would really be worth it. Zsh is at least better than bash.


There should be no issue. Just execute scripts with zsh if it isn't compatible. Inside fish you could just do the following: $ zsh ./script.sh




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: