escape "<" char from command line
Hello,
Thanks for your work, I installed and tested pet from today only and it seems very promising.
I did not find the way to escape "special" char when adding new command.
Imagine this snippet :
description = "List RDS snapshots older than <date> from <profile> for <region>"
command = "aws --profile <profile> rds describe-db-snapshots --region <region> --query 'DBSnapshots[?SnapshotCreateTime<=`<date>`]'"
The problem is that <= starts a new parameter whereas it is part of the command (not a variable like "date").
May be someone know how to escape first < ?
thanks
I use pet to generate parameterized sql queries and had to work around this by replacing all occurrences of <= with < but would love to avoid that.
I would prefer lower cased shell environment variables. Then you can use normal escaping rules.
I just started using the superpet fork of pet and it seems to fix this issue. Or at least, it doesn't interpret '<=' as a parameter. https://github.com/RamiAwar/superpet
(no offense to pet, I love it! And superpet is just pet with a few extra fixes)
edit: I would still love to be able to escape a '<' though. Superpet doesn't let you do that either. But superpet does more narrowly and more correctly parse out what's supposed to be a parameter and what's part of your actual command.
Hey! Developer of superpet here, I fixed this issue in Pet now. I'm maintaining pet nearly every day nowadays so expect a lot more improvements! The new regex pattern captures this properly I believe.
@varenc @xp-1000