Closed nichtich closed 7 years ago
yep. The cleanest to do would probably be to rely on an opt-in option ( -cb, --clipboard
?) to copy to the clipboard.
Then we might simply need a global config file to make it the default/preferred behavior for the clipboard addicts as myself ^^
A remarque on the current implementation: if the command is piped, the Copied to Clipboard
will not come polluting as it is not written on stdout
but directly on /dev/tty
(see copy2cb's code
). But it's hacky and quite counter-intuitive (just like those horrible progress stats when you pipe a curl command), so I wouldn't mind getting over it
The config file would be ~/.wdconfig
, right? The --clipboard
option seems to be a global option for all subcommands such as --language
and --verbose
.
hello @nichtich, I have been cleaning out all those fancy clipboard behaviors, could you give it a look before I make it a major release? 1071551
introduced a global config mechanism in 7c4a946
See https://github.com/nichtich/wikidata-cli/commit/925cf7e05a5138b6802502fdc0b398b3a35beaa8 for an additional option to suppress such output - a cleaner solution would be to not show it in the first place