Hacker News new | past | comments | ask | show | jobs | submit login

He probably means that it's not backwards compatible with bash, so you have to make it a fish script to run it as fish script.



But do you need to? Just write it for bash and run it from fish the same way you run python scripts from bash.


It seems a lot of people don't realize `bash`, `sh`, `zsh` etc... are executable binaries just like any other on the system, and that you don't need to be logged in to a bash shell to run bash scripts.


This isn't the case for sourced scripts. Running a script in bash from fish that changes your current directory will do one of two things: It'll move you to that directory but inside of a bash shell, or it will move you to that directory in a bash shell, bash's cd will return, and you'll be in the same directory as before, still in the fish shell.


The problem is that some scripts are written to be `source`d.


I'm no CLI wizard, so when I sit down to make my own function or alias I'm going to be googling how to do it whether it's for Bash or Fish.

What I meant in my comment above is a lot of 'download an install' instructions in tutorials, and sometimes installation wizards for programs are written for bash, and can't be run without modification in Fish. Not a major setback, but for a Bash user it would just work.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: