maim icon indicating copy to clipboard operation
maim copied to clipboard

`maim -s` prints help, requires filename

Open coreyogburn opened this issue 1 year ago • 2 comments

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.

coreyogburn avatar May 02 '23 16:05 coreyogburn

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" ?

slyshot avatar Jun 01 '23 17:06 slyshot

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."

foxpy avatar Jul 01 '23 10:07 foxpy