maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
227 stars 24 forks source link

Don't show "copied to Clipboard" #4

Closed nichtich closed 7 years ago

nichtich commented 8 years ago

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

maxlath commented 8 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

nichtich commented 8 years ago

The config file would be ~/.wdconfig, right? The --clipboard option seems to be a global option for all subcommands such as --language and --verbose.

maxlath commented 7 years ago

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

maxlath commented 7 years ago

introduced a global config mechanism in 7c4a946