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

SH_GLOB influence on a script and on an autoload function



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



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