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

Why no $match for parens inside a ~^ ?



Hi,
I'm matching a pattern:
[[ "zparseopts -F" == *(zparseopts)*~^*(-F)* ]]
printf →%s\\n $? "$match[@]"

with output:
→0
→zparseopts


I would want \3 to contain -F… because, I would once want to use (-F|) there, and be able to test if the option is given… Is it possible? 

~^ is a double negation that makes the pattern work like "if-contains zparseopts AND -F"


--
Best regards,
Sebastian Gniazdowski



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