3 ms·
This looks great. I am not sure about the different handling of globbing, because globbing seems more common on the command line's everyday use than complex ind
by bonzini 6y ago
This looks great. I am not sure about the different handling of globbing, because globbing seems more common on the command line's everyday use than complex indexing; double quotes are manageable and they could be the default outside top-level context. Zsh's "don't expand words but expand wildcards" seems like a nice middle ground.
- hnlmorg 6y agoAuthor here: Yeah I'm not entirely sold on my approach to globbing either. From an academic perspective I stand by my decision to make globbing functional. But from a usability perspective it kind of sucks. The introduction of the `@g` prefix to allow inlined globbing does make things a little less painful but I'm honestly not sold on that solution either. I'm open to suggestions / changing things up wrt globbing and will take another look at Zsh to see how they've addressed the problem. Thanks for the feedback.
- wodenokoto 6y agoI agree on the concept being brilliant, especially as it gives easy access to use regex instead of glob, which is rather clumsy to do in normal bash. It also prevents a lot of accidental globbing. I would need to use it for a while to decide if the extra syntax outweighs those benefits, but I like the way of thinking!
- Pxtl 6y agoThe worst "accidental glob" is Windows Powershell, where square-brackets in filenames means you can't pipe from "ls" into other cmdlets because it interprets the square-brackets as filter commands even when they read them from the filesystem itself.