Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaping curly braces in command #25

Open
qbx2 opened this issue Sep 24, 2024 · 1 comment
Open

Escaping curly braces in command #25

qbx2 opened this issue Sep 24, 2024 · 1 comment

Comments

@qbx2
Copy link

qbx2 commented Sep 24, 2024

Hello. First of all, thank you for writing this super useful utility.

Today, I wanted to run curl commands using rargs, with -w '%{http_code}' to change curl's output behavior. However, I just found that rargs is replacing the format string to '%'. I tried using '{{' or '{' instead of '{' but it did not work. Is this possible to escape curly braces in this case?

@qbx2
Copy link
Author

qbx2 commented Sep 24, 2024

My workaround:

$ export FORMAT='%{http_code}\n'
$ pbpaste | rargs bash -c 'curl -w "$FORMAT" ...'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant