> it is often better to use if cfg!(...) instead of #[cfg(...)] because code behind the latter is eliminated very early My experience with this is the other way around, especially if you have crates tied to that feature. The cfg! is a marco that compiles to true/false, so whatever is inside of the if guard needs to compile regardless. E.g.: Cargo.toml [features] default = [] my_feature = ["deps:feature_dependency"] […
Fish 4.0: The Fish of Theseus
151–160 of 204 posts
Re: Fish 4.0: The Fish of Theseus
#152Earlier quoted context omitted.
Me too. I just keep watching the crustea-culting and wondering if I’m actually missing out.
So read this article, which is about exactly this?...
> It’s tempting to try to sweep this under the rug because it feels gauche to say, but it’s actually important for a number of reasons.
> For one, fish is a hobby project, and that means we want it to be fun for us.
Re: Fish 4.0: The Fish of Theseus
#153I wonder how a conversion of a C++ project that makes extensive usage on ranges would go.
Re: Fish 4.0: The Fish of Theseus
#154Earlier quoted context omitted.
Agree with you on helix. I love it. Atuin for improved history search. Starship for an improved shell prompt. zoxide - better cd ripgrep - better grep just - a command runner. I put project specific commands/scripts in there so I don’t have to remember. All of these are indispensable for me.
imho starship is really just eye candy for the shell; it's not necessarily an actually improved shell prompt if you're on a "modern" shell like fish (a shell for the '90s!) or if you've put effort into customizing your shell experience with any of the other shells.
I want to say though, great work on this migration! Really fantastic work that others can learn from when they try a similar migration.
Re: Fish 4.0: The Fish of Theseus
#155I am curious to ask others here, are there other low-config alternative tools like Fish that, looking back, now seem like a no brainer? Ghostty is a recent example, Helix seems like another. I’d love to know about other tools people are using that have improved or simplified their lives.
Agree with you on helix. I love it. Atuin for improved history search. Starship for an improved shell prompt. zoxide - better cd ripgrep - better grep just - a command runner. I put project specific commands/scripts in there so I don’t have to remember. All of these are indispensable for me.
I run into so many issues trying to adapt the regex in my head (usually PCRE) into the older grep and egrep style.
Re: Fish 4.0: The Fish of Theseus
#156Re: Fish 4.0: The Fish of Theseus
#157I 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…
Do you mind sharing what you think are the killer features of fish?
Really, not needing to pull in other people’s janky scripts because the built-in features work well is huge. I still configure fish and use a few scripts, but it’s the lack of the massive cottage industry that is the primary draw for me.
Of course, many devs see that as a failing: “how could a shell do its job well without a thousand knobs to tweak?”
Re: Fish 4.0: The Fish of Theseus
#158Is fish better than Zsh?
Fish offers one behaviour out of the box with very little configurability, and that it's. If you like that behaviour then Fish is great. If you don't, then well, it's not so much.
zsh on the other hand is very flexible and can be shaped in to more or less anything you like. Some people really like that sort of flexibility and configurability, others don't.
Re: Fish 4.0: The Fish of Theseus
#159Earlier quoted context omitted.
It's 'easier' for some people but you lose GNU bash compatibility and it kinda underlines all of the issues with interactive only shell systems -- a lack of interoperability. It's honestly a non-issue in the current year to learn zsh or tcsh
On the other hand, fish being a clean-room shell implementation not beholden to the baggage of legacy systems is immune to some crazy behaviors or vulnerabilities that other shells - including zsh - are prone to: https://yossarian.net/til/post/some-surprising-code-executio... Compatibility has also come a long way in recent releases; you should give it a try.
Re: Fish 4.0: The Fish of Theseus
#160Earlier quoted context omitted.
On the other hand, fish being a clean-room shell implementation not beholden to the baggage of legacy systems is immune to some crazy behaviors or vulnerabilities that other shells - including zsh - are prone to: https://yossarian.net/til/post/some-surprising-code-executio... Compatibility has also come a long way in recent releases; you should give it a try.
They don't work in zsh; they're bash issues.
Try this (tested with zsh 5.9 on archlinux):
foo='PWD[$(echo hahaha >&2)0]+42'
[[ "$foo" -eq 5 ]]
In bash, this would also print "hahaha" with "a" (or any other possible variable name) instead of "PWD", that's why many think it doesn't work at all in zsh.I'm pretty sure zsh has an optimization where it skips the indexing if the variable doesn't exist, which happens to sometimes stop this. But since you can just reference variables like PWD, that you know exist, it's not really a security improvement.