zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: unmatched '
Date: Fri, 9 Mar 2018 09:50:35 -0800	[thread overview]
Message-ID: <2dcec644-7acb-5916-2858-2301206f1da8@eastlink.ca> (raw)

I have a function that lists all directories matching a nesting set of 
strings:

$ c etc systemd system

... the list is culled by matching each string in turn.  It works fine 
except that:

$ c etc

(eval):1: unmatched '

... but that's the one and only directory that throws that error.  I've 
tested dozens of directories and combinations and all are fine except 
'etc'. I suspect this abomination:

/etc/DSHR's Blog: Using the official Linux overlayfs_files

... God knows why that's permitted, but I'm thinking that the single 
quote is doing the obvious thing as far as 'eval' in concerned.  Can I 
prevent that?  Or, if it must be an error, can I get eval to ignore it 
somehow? The offending line is this:

baz=(`eval print -l $bar $grepstring`)

... I want to sent the output of printing '$bar' after it's been piped 
through the chain of greps that are built up and saved in the 
'$grepstring' variable, and save that filtered and colored result in 
'$baz'.  Apart from the above, it works perfectly.  I'm betting there's 
a flag ${(flag)bar} that fixes it, i.e. forcing " DSHR's " to be 
literal.  Otherwise I will excoriate the offending directories.  Work of 
the Devil.



             reply	other threads:[~2018-03-09 17:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 17:50 Ray Andrews [this message]
2018-03-09 20:23 ` Bart Schaefer
2018-03-09 22:45   ` Ray Andrews
2018-03-09 23:12     ` Ray Andrews
2018-03-10  3:20     ` Aaron Schrab
2018-03-10  3:51       ` Ray Andrews
2018-03-10 17:40         ` Ray Andrews

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=2dcec644-7acb-5916-2858-2301206f1da8@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).