Live data from Hacker News

Fish shell 2.2

fishshell.com

11–20 of 73 posts

Re: Fish shell 2.2

#11
i used fish 10 years ago. since then i use zsh. i am happy with zsh. but fish is a good shell. incredible it's still being developed.

Re: Fish shell 2.2

#12
post #4

I use Fish shell on Ubuntu and OS X for basic stuff: file manipulation, using command-line apps, and occassionally doing some light shell scripting to automate my workflow. Coming from BASH this shell feels like a much-needed update! Instead of worrying to make sure my terminal has all of these feature and then having a different experience in each terminal app - now All of the features are in shell not the terminal…

> its not compatible with BASH's shell scripting, which means you often cant just run shell scripts written by others, you may have to reformat it a little first. What exactly do you mean by “Shell scripts”? If the script contains a proper Shebang you can easily run it via `./script.sh`. If not you use: `bash ./script.sh`.

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.

Re: Fish shell 2.2

#13
post #12

Earlier quoted context omitted.

> its not compatible with BASH's shell scripting, which means you often cant just run shell scripts written by others, you may have to reformat it a little first. What exactly do you mean by “Shell scripts”? If the script contains a proper Shebang you can easily run it via `./script.sh`. If not you use: `bash ./script.sh`.

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.

Re: Fish shell 2.2

#14
post #13
post #12

Earlier quoted context omitted.

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.

Re: Fish shell 2.2

#15
post #8
post #5

My main gripe with a shell like Fish is that it won't work with the trusted ol' BASH scripts. Seeing as I deal with quite some BASH scripts on a day-to-day basis at work this keeps me from trying it out, even though I'd love to be able to use something more sophisticated/evolved than plain BASH.

How come your scripts don't work with #!/bin/bash ?

Yeah, I keep seeing this complaint come up. Interesting that so many people don't realize you can run bash scripts from another shell without fanfare.

Re: Fish shell 2.2

#16
post #13
post #12

Earlier quoted context omitted.

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.

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

Re: Fish shell 2.2

#17
post #4

I use Fish shell on Ubuntu and OS X for basic stuff: file manipulation, using command-line apps, and occassionally doing some light shell scripting to automate my workflow. Coming from BASH this shell feels like a much-needed update! Instead of worrying to make sure my terminal has all of these feature and then having a different experience in each terminal app - now All of the features are in shell not the terminal…

> its not compatible with BASH's shell scripting, which means you often cant just run shell scripts written by others, you may have to reformat it a little first. What exactly do you mean by “Shell scripts”? If the script contains a proper Shebang you can easily run it via `./script.sh`. If not you use: `bash ./script.sh`.

The biggest problem I have is scripts that are meant to be exec-ed from the interactive shell. For example, scripts that set environment variables and change the current directory.

Re: Fish shell 2.2

#18
post #5

My main gripe with a shell like Fish is that it won't work with the trusted ol' BASH scripts. Seeing as I deal with quite some BASH scripts on a day-to-day basis at work this keeps me from trying it out, even though I'd love to be able to use something more sophisticated/evolved than plain BASH.

so it seems that hn blocks on ip after a posting the hive mind disagrees with - maybe stuff like "down with chairman pao" or "fuck the femtards" - but anyway, we just find new ip addresses! we are legion, we are the commentators!

Re: Fish shell 2.2

#19
post #4

I use Fish shell on Ubuntu and OS X for basic stuff: file manipulation, using command-line apps, and occassionally doing some light shell scripting to automate my workflow. Coming from BASH this shell feels like a much-needed update! Instead of worrying to make sure my terminal has all of these feature and then having a different experience in each terminal app - now All of the features are in shell not the terminal…

> its not compatible with BASH's shell scripting, which means you often cant just run shell scripts written by others, you may have to reformat it a little first. What exactly do you mean by “Shell scripts”? If the script contains a proper Shebang you can easily run it via `./script.sh`. If not you use: `bash ./script.sh`.

I have several bash functions that need to be sourced to be included. For instance, I use `cdc` to change to my code directory, where I keep my source for projects I am working on. If I type `cdc name` it changes it to my projects source directory, save me a lot of keystrokes in a day as I have many that I flip between. This sourcing of a function is required due to the way cd is handled, and in it's current form, not directly usable under fish. Maybe it's easier under fish, but fish isn't backwards compatible to make this work out of the box.

Re: Fish shell 2.2

#20
post #8
post #5

My main gripe with a shell like Fish is that it won't work with the trusted ol' BASH scripts. Seeing as I deal with quite some BASH scripts on a day-to-day basis at work this keeps me from trying it out, even though I'd love to be able to use something more sophisticated/evolved than plain BASH.

How come your scripts don't work with #!/bin/bash ?

Because we don't always source a shell script, you may need to source functions for certain functionality to work.
Post reply on HN