zsh-workers
 help / color / mirror / code / Atom feed
* SH_GLOB influence on a script and on an autoload function
@ 2016-06-11  5:11 Sebastian Gniazdowski
  2016-06-11 17:14 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Gniazdowski @ 2016-06-11  5:11 UTC (permalink / raw)
  To: Zsh hackers list

Hello
Below is a simple script (save to file rtest1) that works well despite
SH_GLOB should or could stop the pattern from parsing. The same
doesn't work for autoload. If one does:

setopt shglob
FPATH=$FPATH:`pwd`
autoload rtest1
rtest1

then error occurs:

rtest1:8: parse error near `('

Why does this happen? Probably no workaround for this?

Best regards,
Sebastian Gniazdowski

================================

#!/usr/local/bin/zsh-5.2-dev-1 --shglob

emulate -LR zsh
setopt extendedglob

tmp="something txt=1234 something"

if [[ "$tmp" = *txt=(#b)([0-9]##)(|[[:blank:]]*) ]]; then
    echo "Matched, match is: $match[1]"
else
    echo "No match"
fi


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

end of thread, other threads:[~2016-09-07 23:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-11  5:11 SH_GLOB influence on a script and on an autoload function Sebastian Gniazdowski
2016-06-11 17:14 ` Bart Schaefer
2016-09-07 10:39   ` Sebastian Gniazdowski
2016-09-07 18:28     ` Bart Schaefer
2016-09-07 19:01       ` Sebastian Gniazdowski
2016-09-07 23:48         ` Bart Schaefer

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