hluk / copyq-commands

Useful commands for CopyQ clipboard manager.
331 stars 73 forks source link

Add a new command: do-compare-based-on-last-two-clipboard-items. #18

Closed zw963 closed 4 years ago

zw963 commented 4 years ago

Done, please check, thank you.

hluk commented 4 years ago

Thanks!

pbodnar commented 4 years ago

Oh, what a coincidence, I was just about to do the same stuff, thanks for contributing this! :) I've just come here when searching for an inspiration of how to write to a TemporaryFile before passing it to WinMerge, for a change.

Some remarks for a potential discussion:

  1. I would suggest to rename the ini file: shouldn't it use "-" for consistency with the other files?
  2. I always wonder why names selected for various commands need to differ so much - what do you think about using at least similar names at the level of the README.md and ini files? It would help users to quickly decide which commands they have already installed and which not.
  3. There are some unnecessary typos in the command description. Apart from others, I would probably omit mentioning the global key for keeping it simple, as well as for consistency with the other commands' descriptions - suggested keyboard shortcuts are part of ini files already.

Also, but that is quite for another ticket, I think it would be great to combine the Replace in Selection command with this one, so that a user can immediately see what gets replaced. (BTW It would be also nice to have user defined replacements, similar to how the Snippets command work.)

pbodnar commented 4 years ago

For anyone interested, the following is possibly an ideal options set passed to the aforementioned WinMerge executable. The command's script line which passes the temporary files to the diff tool:

execute('winmergeu', '/e', '/x', '/u', '/fl', '/dl', 'item1', '/dr', 'item2', name1, name2)
zw963 commented 4 years ago

@pbodnar , sorry for name issue, i am not a english native speaker, can you please create a PR for fix my name issue? i think @hluk will very luck to merge your work.