maim
maim copied to clipboard
`maim -s` prints help, requires filename
maim's help claims: "By default it outputs the encoded image data directly to standard output."
Running maim -s
or maim --select
on Ubuntu 20.04 only prints the help. Adding a filename results in a screenshot being taken but the image is stored in the file and not output to stdout.
That seems intentional: https://github.com/naelstrof/maim/blob/463492be48143dca3bc6fa6c3555ffb9f54d3a5a/src/main.cpp#L457-L462 This is a doc bug, the help shouldn't say that. Wonder how one could best phrase the actual behavior. "When not in a tty, the program sends the encoded image data to standard output" ?
Wonder how one could best phrase the actual behavior.
Well, I have an idea actually. The current doc says this:
"By default it outputs the encoded image data directly to standard output."
I think we can replace it with this:
"By default it outputs the encoded image data directly to standard output, unless standard output is a terminal."