gnome-clipboard-history
gnome-clipboard-history copied to clipboard
Add option + shortcut like private mode to toggle between regex and non-regex search
Describe the bug
Searching for (
or )
(along with strings pre or suffixed to the character) will not appear in a clipboard.
For programmers this is irksome as searching for a function like function(
when the text def function(stuff)
is in the clipboard results in nothing.
How To Reproduce
Have an item in the clipboard with either (
or )
and search.
Versions
org.gnome.shell.extensions.clipboard-history GNOME Shell 42.0 GCH Version: 15 org.gnome.shell.extensions.clipboard-history cache-only-favorites false org.gnome.shell.extensions.clipboard-history cache-size 100 org.gnome.shell.extensions.clipboard-history clear-history @as [] org.gnome.shell.extensions.clipboard-history confirm-clear true org.gnome.shell.extensions.clipboard-history disable-down-arrow true org.gnome.shell.extensions.clipboard-history display-mode 0 org.gnome.shell.extensions.clipboard-history enable-keybindings true org.gnome.shell.extensions.clipboard-history history-size 1000 org.gnome.shell.extensions.clipboard-history move-item-first true org.gnome.shell.extensions.clipboard-history next-entry @as [] org.gnome.shell.extensions.clipboard-history notify-on-copy false org.gnome.shell.extensions.clipboard-history paste-on-selection false org.gnome.shell.extensions.clipboard-history prev-entry @as [] org.gnome.shell.extensions.clipboard-history private-mode false org.gnome.shell.extensions.clipboard-history process-primary-selection false org.gnome.shell.extensions.clipboard-history strip-text true org.gnome.shell.extensions.clipboard-history toggle-menu ['Insert'] org.gnome.shell.extensions.clipboard-history toggle-private-mode ['<Super><Shift>P'] org.gnome.shell.extensions.clipboard-history topbar-preview-size 10 org.gnome.shell.extensions.clipboard-history window-width-percentage 25
Yeah, search is regex so you'll have to escape it: \(
.
Could be interesting to provide a sanitized, non-regex option :thinking: :)
Yeah, I couldn't figure out what to do UX wise though because I feel like you'd want to switch between the two often. Maybe that's not true and it could just be a setting, but I'm not sure.
Yeah, I couldn't figure out what to do UX wise though because I feel like you'd want to switch between the two often.
An additional toggle to enable/disable regex parsing alongside the existing private mode toggle would be awesome.
That actually sounds very reasonable. Should a global shortcut also be added or nah?
Should a global shortcut also be added or nah?
Would be really handy I guess, so you could leave your fingers on the keyboard... 🧙
Sounds like a plan to me!
I don't have enough time, so I went with a dumb solution: just search both the raw query and its regex equivalent. This will over-return search results, but you should almost always be able to refine your search using regex (unless you're searching for regex in which case things get weird).