out-of-cheese-error / the-way

A code snippets manager for your terminal.
MIT License
352 stars 16 forks source link

Feat/improve copy to clipboard #118

Closed Jarsop closed 2 years ago

Jarsop commented 2 years ago

Adding a new field (copy_cmd) in the default configuration and in the configuration file. It allows to easily add a new copy command.

Jarsop commented 2 years ago

Hello @Ninjani, does it means that you want to support only one command by OS and just override the default command by the configuration field ?

Ninjani commented 2 years ago

Yes, that's what I had in mind, that way it's easy to swap out with xsel or wl-copy or anything the user wants. What do you think?

Jarsop commented 2 years ago

Sounds good too, maybe a bit harder to handling the errors properly but more generic. I think an example in the README for that case will be welcome :) (I will add it)

Jarsop commented 2 years ago

I think that I will also add an error kind for the case of we are on a non supported OS by default copy command

Jarsop commented 2 years ago

I will update the README soon, after your review

Jarsop commented 2 years ago

@Ninjani Any update about this topic?

Jarsop commented 2 years ago

Sorry got caught up with work. Looks pretty good, just a minor change and we're good to go I think.

No problem we are all busy :)

Ninjani commented 2 years ago

Looks good! Would you like to update the README and CHANGELOG?

Jarsop commented 2 years ago

Looks good! Would you like to update the README and CHANGELOG?

Yes I will do it !

Jarsop commented 2 years ago

Done. I also added an example with xsel and I incremented the minor version (I don't know if you consider it a patch or a minor increment). Moreover I added a warning message when the copy_cmd field value is empty.

Ninjani commented 2 years ago

Thanks @Jarsop I'll make a new release this weekend