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

xclip-copyfile's --help flag results in unexpected output #16

Open
astrand opened this issue Feb 21, 2011 · 4 comments
Open

xclip-copyfile's --help flag results in unexpected output #16

astrand opened this issue Feb 21, 2011 · 4 comments

Comments

@astrand
Copy link
Owner

astrand commented Feb 21, 2011

This is what happens when xclip-copyfile is ran with the --help flag:

$ /usr/bin/xclip-copyfile --help

tar: Usage: dirname NAME\n or: dirname OPTION\nOutput NAME with its last non-slash component and trailing slashes removed;\nif NAME contains no /'s, output `.' (meaning the current directory).\n\n --help display this help and exit\n --version output version information and exit\n\nExamples:\n dirname /usr/bin/ Output "/usr".\n dirname stdio.h Output ".".\n\nReport dirname bugs to bug-coreutils@gnu.org\nGNU coreutils home page: <http://www.gnu.org/software/coreutils/&gt;\nGeneral help using GNU software: <http://www.gnu.org/gethelp/&gt;\nFor complete documentation, run: info coreutils 'dirname invocation': Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now

The same thing applies to xclip-cutfile and xclip-pastefile.

Reported by: bapabooiee

Original Ticket: xclip/bugs/5

@astrand
Copy link
Owner Author

astrand commented Feb 21, 2011

Ah, silly me. This might not actually be a bug, per se, as it seems xclip-copyfile's parameters are simply passed to `tar'.

Though, I do still think that being bombarded with that kind of output when using the --help flag is quite unexpected.

Original comment by: bapabooiee

@astrand
Copy link
Owner Author

astrand commented Feb 21, 2011

  • summary: xclip-copyfile's --help flag passes its help output to `tar' --> xclip-copyfile's --help flag results in unexpected output

Original comment by: bapabooiee

@trofi
Copy link

trofi commented Nov 26, 2020

+1. Gentoo also got downstream report about unexpected --help handling: https://bugs.gentoo.org/355887.

@orbea
Copy link

orbea commented Aug 29, 2023

Would teaching xclip-copyfile about -h/--help and then printing an error for any other unknown command-line be an acceptable solution? Unfortunately tar(1) doesn't support -- and --verbatim-files-from would break support with older tar releases.

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

No branches or pull requests

3 participants