4 ms·
>Some is better than none, that's the lesson learned from OMZ's implementation of this feature. I disagree. I'd rather have predictability here. >when I paste
by faho 8y ago
>Some is better than none, that's the lesson learned from OMZ's implementation of this feature.
I disagree. I'd rather have predictability here.
>when I paste a URL containing wildcards into single quotes in fish, I don't see any escaping taking place.
That's because you've not pasted anything that needs escaping. In single-quotes, only single-quotes and backslashes are special, and they are escaped.
Even if you paste script that itself contains single-quotes, it'll work.
- darkpuma 8y agoThe truly unpredictable UX is when a noob tries to paste a youtube url into their shell and gets a bewildering error message about a wildcard (and the error message carrot doesn't even point at the guilty wildcard!) That is very far from the behavior the user was predicting, unless they've been around the shell block a few times already (in which case they could probably make due in a shittier shell anyway. Is fish optimizing for 'user friendly' or 'user friendly for experiences users'?)
- faho 8y ago>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 rules there simple than add special cases for URLs.
- darkpuma 8y agoThat "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 switch to zsh (where complaints about url escaping inconsistency don't seem to come up very often at all despite your reasoning.) Here is an idea to improve the UX that zsh currently offers: use bracketed paste mode and prompt the user whenever they paste something that looks like a URL, asking if they'd like it to be escaped/quoted. y[enter] or n[enter] after the paste is much nicer than remembering to press ' before you paste and then pressing it again after you paste.
- zapzupnz 8y ago> 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.
- darkpuma 8y ago>The principle of "no surprises" Is violated by this: > 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=LBoF1e5YDdQ ^ Particularly for software that sells itself as user friendly. The carrot doesn't even point at the wildcard! I am very far from the first person to raise this issue with the fish devs, you can find numerous people bringing this up going years back. I'm generally pretty cognizant of when I have unusual requests or opinions about how software should work, and this is not one of those times.
- ridiculous_fish 8y agoYour proposed remedy is for the shell to insert something different than what the user inputs. That is much more surprising. No program works that way.
- darkpuma 8y agoNo program other than a shell requires that a URL copied out of your browser's address bar be escaped. Users may not be accustomed to a program escaping or quoting text they paste, but they're also definitely not accustomed to escaping or quoting strings manually.