zsh-users
 help / color / mirror / code / Atom feed
* unmatched '
@ 2018-03-09 17:50 Ray Andrews
  2018-03-09 20:23 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Ray Andrews @ 2018-03-09 17:50 UTC (permalink / raw)
  To: Zsh Users

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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-10 18:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09 17:50 unmatched ' Ray Andrews
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

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).