-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
format option does not work #269
Comments
thanks for letting me know @greymd ! i'll take a look at it. |
hi, sorry for the late reply, too many things in life in parallel :) This is indeed a bug that started when moving to python 3, since this feature doesn't abstract the python implementation details properly. I'll fix it soon after a new release is out. In the mean time, if you need to use this feature, you can change the formatting to python3 standard:
|
Thanks for this workaround. (a) But I do not know how to format two columns. The syntax of the -f option as documented is that I can format two columns by separating the formats by a comma. This doesn't work, not for the workaround, not if done like this.
Only the first column gets formatted. Should I be doing this another way? Is there another way? (b) And where is the Python format syntax documented. I've looked. I know about the printf % style formatting but what does the ":" mean? I've had a look and a URL would be useful. |
The format of the parameter of
Where C is the output column number, and F is a python 3 format. Examples:
Here's an example query (input is generated using linux's
The official python3 formatting docs are in here Btw, can you provide examples of use-cases where you'd want formatting? This feature is very rarely used by users, so I haven't invested a lot in it relative to other parts of the product. |
Hi,
The format option does not work correctly at the latest version 2.0.19.
As documented here,
https://github.com/harelba/q/blob/master/examples/EXAMPLES.markdown
But the actual behavior is like below.
The text was updated successfully, but these errors were encountered: