Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
SH_GLOB influence on a script and on an autoload function
- X-seq: zsh-workers 38658
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: SH_GLOB influence on a script and on an autoload function
- Date: Sat, 11 Jun 2016 07:11:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=oQwh4fKAnB4Mp7Y1RfJ9BOTPvx2dhSlHLu7SSZVepD8=; b=PuPiF+dAu0WfDsVXW8NmwFqfKBSRrUGA8afV7KF7T/n4nubqAhg0+7SfNzKkm9VVVW IxzTV/fBKwQxx/CIquRKGaYxy//PjuSblAuRYifXyiMACDogbn6hvKWq+MZI+pUtCcOa sFn6WAsuuEOoTzxGtQB7qruuBaYmCJEsWMh1YSXPKaRn3v1eKYt8tvpmHjcGfTmh/RDT KlMHiBBIrz5XN0GmQvy/Ep3ZrKOxr5sXm3gs6d4ZaV8agG3vXngEaLrCtDByYDK4PzH6 fWcHgeiDJ0GRjeVjQSAwAYtX1pSpKx2LZwyjN9OrNPz5CcjWrw6MTD12LoKGy3OWQP1U WiJw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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