zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: Avoiding the zshells intelligence...in one case
Date: Mon, 23 Jan 2017 21:42:56 -0800	[thread overview]
Message-ID: <213742a3-d208-973d-3b86-1ac29b9d96dd@eastlink.ca> (raw)
In-Reply-To: <ca42009b-6d56-ae6e-9369-02ffd4258a28@gmx.com>

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.



  reply	other threads:[~2017-01-24  6:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22  8:01 Meino.Cramer
2017-01-22 18:26 ` Bart Schaefer
2017-01-22 21:52   ` Martin Vaeth
2017-01-22 22:41     ` Bart Schaefer
2017-01-23 18:09       ` Martin Vaeth
2017-01-23 22:26         ` Bart Schaefer
2017-01-23 22:40           ` Ray Andrews
2017-01-24  2:48             ` Eric Cook
2017-01-24  5:42               ` Ray Andrews [this message]
2017-01-24 15:58                 ` Eric Cook
2017-01-24 18:21                   ` Ray Andrews
2017-01-24 22:31                     ` Bart Schaefer
2017-01-25  1:19                       ` Ray Andrews
2017-01-25  3:46                         ` Bart Schaefer
2017-01-25  5:40                           ` Ray Andrews
2017-01-25 16:50                             ` Bart Schaefer
2017-01-25  4:56                         ` Bart Schaefer
2017-01-25  5:47                           ` Ray Andrews
2017-01-23 22:44         ` Bart Schaefer
2017-01-24 19:37           ` Martin Vaeth
2017-01-24 21:24             ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=213742a3-d208-973d-3b86-1ac29b9d96dd@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).