CopyQ icon indicating copy to clipboard operation
CopyQ copied to clipboard

--help not working on windows powershell, cmd or gitbash

Open bedge opened this issue 1 year ago • 4 comments

Describe the bug From CMD:

C:\Users\edgeb1>copyq --help
<no output>

From powershell

➜ copyq --help
<no output>

From Gitbash

edgeb1@RSCMW3512 MINGW64 ~
$ copyq --help
<no output>

To Reproduce

  1. Run copyq --help from any available shell.

Expected behavior Should display help options

image

Version, OS and Environment

image

that said, windows 11, copyq 9.1.0

image

  • Application Version (for example 7.1.0) 9.1.0

  • OS (for example Windows 11, Ubuntu 22.04, macOS Sonoma 14.4) windows 11

  • Desktop environment, window manager (if applicable) windows 11

Additional context I am able to run copyq --add XXX to add things to the clipboard. I just get no output from any copyq shell commands

bedge avatar Dec 27 '24 18:12 bedge

I found this: https://github.com/hluk/CopyQ/issues/2852#issuecomment-2417234014 stating:

Unfortunately, this is a known problem on Windows (I don't see a way to fix this).

See: https://copyq.readthedocs.io/en/latest/known-issues.html#on-windows-copyq-does-not-print-anything-on-console

But the documentation link is sorely lacking.

How is this supposed to fix it? image

This has no effect in GitBash, or CMD

Ref:

  • https://stackoverflow.com/questions/21719609/why-do-i-get-no-output-from-console-when-running-from-command-line
  • https://github.com/hluk/CopyQ/issues/349
  • https://github.com/hluk/CopyQ/issues/1182
  • https://github.com/hluk/CopyQ/issues/499
  • https://github.com/hluk/CopyQ/issues/2376
  • https://github.com/hluk/CopyQ/issues/2852

bedge avatar Jan 01 '25 18:01 bedge

Is this not indicative of needing to change the mechanism used to print to stdout for windows targets? I have not looked at the code, but there's usually half a dozen abstractions one can use for stdout processing, no?

bedge avatar Jan 01 '25 18:01 bedge

run this .\copyq.exe --help | echo

buffer error with windows if it works.

ajangir avatar Mar 19 '25 04:03 ajangir

Yes, that works:

C:\Program Files\CopyQ>.\copyq.exe --help | echo
ECHO is on.

bedge avatar Mar 21 '25 03:03 bedge