Live data from Hacker News

Fish shell 3.0

github.com

121–130 of 227 posts

Re: Fish shell 3.0

#121

Still no auto-escaping or quoting for pasted URLs, that's really disappointing. I respect fish's stated goals of user friedlieness, but I just don't think they've realized that goal in ways that other more mainstream shells have: > mpv https://www.youtube.com/watch?v=LBoF1e5YDdQ fish: No matches for wildcard 'https://www.youtube.com/watch?v=LBoF1e5YDdQ'. See `help expand`. mpv https://www.youtube.com/watch?v=LBoF1e5Y…

URL pasting is indeed annoying. That said, second-guessing the user's input is dangerous territory, which is why no shells do what you describe by default. The way we plan to address this in fish is to make ? an ordinary character instead of a wildcard. Then URLs will have nothing to escape. You can opt into this change today by setting the 'qmark-noglob' feature flag: set -U fish_features qmark-noglob now ? no longe…

>Then URLs will have nothing to escape.

Unfortunately, `&` is used in URLs, and is special also in the middle of a token.

Re: Fish shell 3.0

#122

Still no auto-escaping or quoting for pasted URLs, that's really disappointing. I respect fish's stated goals of user friedlieness, but I just don't think they've realized that goal in ways that other more mainstream shells have: > mpv https://www.youtube.com/watch?v=LBoF1e5YDdQ fish: No matches for wildcard 'https://www.youtube.com/watch?v=LBoF1e5YDdQ'. See `help expand`. mpv https://www.youtube.com/watch?v=LBoF1e5Y…

URL pasting is indeed annoying. That said, second-guessing the user's input is dangerous territory, which is why no shells do what you describe by default. The way we plan to address this in fish is to make ? an ordinary character instead of a wildcard. Then URLs will have nothing to escape. You can opt into this change today by setting the 'qmark-noglob' feature flag: set -U fish_features qmark-noglob now ? no longe…

> "That said, second-guessing the user's input is dangerous territory, which is why no shells do what you describe by default."

Sure that's true, but on the other hand I don't see anybody ever recommend default zsh. It seems pretty widely understood in the community that OMZ (or their equivalents, I have unrelated complaints with OMZ) are sane 'defaults'.

Re: Fish shell 3.0

#123

After 15 years, I still struggle to test if a string is empty in shell languages. Do I use square brackets, double square brackets, equal sign, double equal sign, test -n, set -q, wtf mate? Do I need to wrap my string variable in double quotes? single quotes? Fish looks great, and I'm going to give it a try, but I ran into these same old shell scripting issues within 2 minutes of trying to configure my prompt, which…

[deleted]

Re: Fish shell 3.0

#124

Earlier quoted context omitted.

When I’ve been teaching people to program, explaining [0] has been a tragic experience. Starting at [0] is not objectively better than [1]. I actually believe it is objectively worse .

I would like to hear your counterarguments to https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E... , which seems to me like a compelling argument.

It seems to be mostly about math, with the only mention of array indexing being that 0 looks nicer. "starting with 0, however, gives the nicer range 0 ≤ i This doesn't seem to be much of an argument so I'm not even sure what to address.

Re: Fish shell 3.0

#125

Apart from the other good stuff in this release, I think this will make a lot of things much easier: fish now supports && (like and), || (like or), and ! (like not), for better migration from POSIX-compliant shells

I upgraded with homebrew to v3.0 but the && syntax still doesn't work, do I have to do something special to enable it?

Close your shell and open it (or run fish again). You’re probably still in the original fish 2.7 that had previously launched. fish --version should show 3.0.0 (edit: yeah, that’s not going to work).

Re: Fish shell 3.0

#126
post #109

Earlier quoted context omitted.

>The truly unpredictable UX is when a noob tries to paste Yes, and you've not solved that. You've only solved that one special edge-case where they're pasting "a youtube url". This only pushes the confusing bit further along, and adds some more cruft on top! Quoting is a fact in shells. The way these languages work is through loads of string interpolation, so you kinda need to learn that. And I'd prefer to make the r…

That "one special edge-case" is easily the most common case by far. Your dismissive attitude towards this is antithetical to the design of user friendly software. Even when the noob manages to learn that ? is a deprecated but still present wildcard in fish, they'll still be left with the unfortunate reality of being forced to manually quote their urls each and every time, until either fish fixes this or until they sw…

> Your dismissive attitude towards this is antithetical to the design of user friendly software

And your dismissive attitude of the project's own design goals is antithetical to the notion that not everybody has the same priorities as you, nor do they think your personal ideas equate to "the design of user friendly software".

The principle of "no surprises" is probably the greatest aspect of "user friendly software" when it comes to power tools such as shells, scripting languages, programming languages, etc. and that seems to be what GP is stating as preferable to edge-case scenario surprises.

You may disagree all you like with that as a priority, but please don't go to the extreme of stating that someone is being dismissive simply because they don't hold your idea up on a golden plinth above their own.

Re: Fish shell 3.0

#127

Earlier quoted context omitted.

I would like to hear your counterarguments to https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E... , which seems to me like a compelling argument.

It seems to be mostly about math, with the only mention of array indexing being that 0 looks nicer. "starting with 0, however, gives the nicer range 0 ≤ i This doesn't seem to be much of an argument so I'm not even sure what to address.

How would you do something like Python's `x[0:10] + x[10:len(x)]` in a 1-indexed way? [1:11] + [1:len(x)+1]? That's uglier.

Re: Fish shell 3.0

#128

Earlier quoted context omitted.

I upgraded with homebrew to v3.0 but the && syntax still doesn't work, do I have to do something special to enable it?

Close your shell and open it (or run fish again). You’re probably still in the original fish 2.7 that had previously launched. fish --version should show 3.0.0 ( edit: yeah, that’s not going to work ).

`fish --version` showed 3.0.0, after brew update but without closing terminal, but `ls && echo finally` still didn't work. However, closing and re-opening terminal, it now works.

Re: Fish shell 3.0

#129

Earlier quoted context omitted.

Close your shell and open it (or run fish again). You’re probably still in the original fish 2.7 that had previously launched. fish --version should show 3.0.0 ( edit: yeah, that’s not going to work ).

`fish --version` showed 3.0.0, after brew update but without closing terminal, but `ls && echo finally` still didn't work. However, closing and re-opening terminal, it now works.

`fish --version` starts a new fish that prints _its_ version.

You were still running the old version, and `echo $version` would have told you.

Re: Fish shell 3.0

#130

Earlier quoted context omitted.

Close your shell and open it (or run fish again). You’re probably still in the original fish 2.7 that had previously launched. fish --version should show 3.0.0 ( edit: yeah, that’s not going to work ).

`fish --version` showed 3.0.0, after brew update but without closing terminal, but `ls && echo finally` still didn't work. However, closing and re-opening terminal, it now works.

Because you still run the old version as your shell, from which you run the new version merely to have it print its version.
Post reply on HN