Keruspe / GPaste

Clipboard management system
BSD 2-Clause "Simplified" License
790 stars 57 forks source link

Problem with select command #338

Closed blakkheimgw closed 3 years ago

blakkheimgw commented 3 years ago

Hello,

Since recently, I was heavily using the gpaste-client select 1 command to select the second latest item in my history. Since latest upgrade (3.38.4), using this commande simply deletes the latest item...

Fedora 33 Gnome 3.38.3 on Xorg GPaste : 3.38.4 (using Gnome extension)

Thanks.

jdoss commented 3 years ago

I am seeing the same kind of problem with 3.38.4. The Gpaste extension only has one item in the history. Downgrading to 3.38.1 fixes this issue.

Fedora 33 GNOME Shell 3.38.3 on Wayland GPaste : 3.38.4 (using Gnome extension)

Keruspe commented 3 years ago

@jdoss logs would be appreciated, also please open another issue, that's not the same problem at all

Keruspe commented 3 years ago

@blakkheimgw Since GPaste 3.38, the items are now identified by an UUID instead of an index (to avoid some race conditions amongst other things). There was an issue handling input which was not an UUID though, I juste fixed it.

This is now the output of gpaste-client select 1 in the upcoming 3.38.5

keruspe@Lou ~ % gpaste-client select 1                                                                                           

** (gpaste-client:113366): CRITICAL **: 11:04:09.722: GDBus.Error:org.gnome.GPaste.Error: Provided uuid doesn't match any item.
blakkheimgw commented 3 years ago

@Keruspe is there a way to have the same behaviour (ability to select the second latest item ?) in new versions ?

Keruspe commented 3 years ago

Would it be ok if I added some gpaste-client get-uuid <index> which would allow you to gpaste-client select $(gpaste-client get-uuid <index>)?

Keruspe commented 3 years ago

I could probably even hide that beind gpaste-client select --use-index 1 or something like that

blakkheimgw commented 3 years ago

Both solutions would be great, indeed ! Thank you.

Keruspe commented 3 years ago

Will try and release that as part of 3.38.5, hopefully this week

Keruspe commented 3 years ago

3.38.5 released with --use-index