Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

91–100 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#91
post #78

Earlier quoted context omitted.

Interesting, I went the other way about 7 years ago - switched from fish to zsh (initially with oh-my-zsh). The interactive experience was similar enough on both shells, and the performance was great on fish and okay-ish on zsh, but two things won me over: 1. With zsh, I can copy-paste some bash snippet and in 99% of cases it will just work. Aside of copy-pasting from StackExchange, I also know a lot of bash syntax b…

Reading the associated issue ( https://github.com/fish-shell/fish-shell/issues/510 ) about the lack of "set -e" was interesting as it highlighted how weird Bash, and shell scripting in general, is from a programming language perspective. Imagine programming in any other environment where every function you call could either succeed or fail catastrophically. There's some talk about adding exception handling to Fish, b…

> Imagine programming in any other environment where every function you call could either succeed or fail catastrophically

Laughs in client-side JS.

Re: Fish 4.0: The Fish of Theseus

#92

I use the shell a lot every day, mainly bash and some ash (alpine). Does something like fish make the experience a bit smoother? is it pretty easy to get into?

To answer your first question specifically, yes. With fish you get substantial ergonomic improvements over bash and ash out of the box. There's also a very minimal learning curve since these features build on familiar idioms. There are some differences with fish as a language that take some getting used to, but bash is always one command away if needed for more complex stuff.

It's absolutely worth a test drive to see if the features excite you. If the lack of bash familiarity is too much of a blocker, then zsh with plugins that provide the same features as fish might be worth a look too.

Re: Fish 4.0: The Fish of Theseus

#93
Surprised to see the line count go up so much, 56K LOC of C++ to 75K of Rust. The blog attributes it to rustfmt using less oneliners. Even so, i would believe that should be a small factor compared to the heaps of duplicate code you get from c++ header files and all the other syntax ergonomics rust gives you.

Is this typical for such a translation. They also mention addition of new features contributing to more code, how much of the addition was new features vs pure translation?

Would be interesting to see the line count of the c++ version if it was run through a formater with similar configuration.

Re: Fish 4.0: The Fish of Theseus

#94
post #32
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

I went bash -> fish -> zsh. The main reason I switched is because zsh can (often) source bash scripts and can use bash completion scripts (usually), and I was tired of having to translate things from bash to fish. I also ran into a few things where something that was relatively easy to do in bash was impossible to do with fish. But that was years ago so maybe that is less of an issue now, and I don't remember exactly…

I can relate with your comment a few years ago, but later the situation drastically got better, while not perfect yet (i.e. I still need a custom autocomplete function for aws). You might want to give it a try now anyway.

Re: Fish 4.0: The Fish of Theseus

#95
post #78

Earlier quoted context omitted.

Interesting, I went the other way about 7 years ago - switched from fish to zsh (initially with oh-my-zsh). The interactive experience was similar enough on both shells, and the performance was great on fish and okay-ish on zsh, but two things won me over: 1. With zsh, I can copy-paste some bash snippet and in 99% of cases it will just work. Aside of copy-pasting from StackExchange, I also know a lot of bash syntax b…

Reading the associated issue ( https://github.com/fish-shell/fish-shell/issues/510 ) about the lack of "set -e" was interesting as it highlighted how weird Bash, and shell scripting in general, is from a programming language perspective. Imagine programming in any other environment where every function you call could either succeed or fail catastrophically. There's some talk about adding exception handling to Fish, b…

But, scripting languages are not programming languages, scripting languages are made to run commands, and by default a script should halt if a command fails, at least in the CLI execution context. The problem is, scripting languages mix programming context and scripting context, so a condition written in the script shouldn't be treated as a CLI exit status. Anyway, I don't use fish for scripts just for the lack of exit on command error. That's essential while scripting.

Re: Fish 4.0: The Fish of Theseus

#96
post #71

Earlier quoted context omitted.

We ship fish with completions ollama and llm, maybe others. We don't have any plans to "integrate" AI into the actual codebase.

I had no idea! Where can I find docs to set this up?

Take some agency for yourself.

https://github.com/search?q=repo%3Afish-shell%2Ffish-shell%2...

That agency includes interpreting the search results alongside the reply to your original comment.

Re: Fish 4.0: The Fish of Theseus

#97

I use the shell a lot every day, mainly bash and some ash (alpine). Does something like fish make the experience a bit smoother? is it pretty easy to get into?

fish is intended to be beginner friendly, whether you're new to the commandline world or not. It's essentially configuration-free, so that's about as easy to get into as you might imagine.

Side note: beginner friendly or not, I've been using various kinds of shells for several decades and I still find Fish delightful. It's friendly to beginners, but also very comfortable to old salts.

Re: Fish 4.0: The Fish of Theseus

#98
post #48

Earlier quoted context omitted.

genuinely curious: with so much love for cygwin, why not just run Linux? possibly with a dual boot?

Corporate jobs are nearly always on Windows machines. Cygwin+GitBash can usually sneak past the gate without raising too many eyebrows. WSL is still voodoo dark mark that can require conversations to get IT to allow.

Exactly. I have been running Linux on my personal computer for 15 years now. But frequently for work purposes and corporate jobs I have to work on Windows.

Re: Fish 4.0: The Fish of Theseus

#99
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

I know it's a typo but this:

> what more could a shell?

Is quite good. It could almost be the tag line for fish shell.

Re: Fish 4.0: The Fish of Theseus

#100
post #78

Earlier quoted context omitted.

Reading the associated issue ( https://github.com/fish-shell/fish-shell/issues/510 ) about the lack of "set -e" was interesting as it highlighted how weird Bash, and shell scripting in general, is from a programming language perspective. Imagine programming in any other environment where every function you call could either succeed or fail catastrophically. There's some talk about adding exception handling to Fish, b…

> Imagine programming in any other environment where every function you call could either succeed or fail catastrophically Laughs in client-side JS.

Hmm? It’s not like a JavaScript exception crashes the entire browser tab.

Client-side JS is event-driven. An unhandled exception stops processing for that event, but doesn’t block other events.

Post reply on HN