Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Avoiding the zshells intelligence...in one case



On 23/01/17 06:48 PM, Eric Cook wrote:

That the point of having single quotes, so nothing within them would be treated syntactically.
This thread is just another plead at being even more lazy, to not have remember to use an
option/syntax to treat a string literally.

Except that that doesn't work with command line arguments nor with things like:

$ alias junk='echo $path'

$ alias wense='whence -m "$1"'


and it seems to me that there's lots of other little exceptions here and there where the quotes end up getting stripped off. Thus the need for 'noglob', and for exactly the same sorts of reasons it would be good to be able to assure literal strings in any situation and do it in such a way that it is spelled out what is going on. As Bart pointed out, the tilde can't be protected even by 'noglob', but 'noexpansionsatall' would give perfect results even on Tuesday and be absolutely frank as to what has been done in exotic situations where simple quoting doesn't work. Why does it have to be difficult? Aren't options like 'noglob' the correct answer for this sort of thing? So why not use the same logic to extend complete protection for strings when needed, as in Meino's problem? Even when there is better syntax, sometimes you just want something to work and the option would not only work but be self-commenting. Or not. Maybe this really is sloppy thinking.




Messages sorted by: Reverse Date, Date, Thread, Author