hluk / copyq-commands

Useful commands for CopyQ clipboard manager.
328 stars 72 forks source link

CopyQ: Command Search&Replace? #74

Closed Clemens-Ratte-Polle closed 6 months ago

Clemens-Ratte-Polle commented 1 year ago

Hi. Top app! :) What about a command to search and replace specific text in an opened and edited item ? Or globally for all items in the actual tab or all tabs? thx :)

hluk commented 10 months ago

I've created Search & Replace command (see README.md for details on how to add the command).

ChristopheC13 commented 6 months ago

Hi,

the search and replace command Application/search-and-replace.ini does not work with a url

example

item = https://url/issues/XXXXX#note-1

find = https://url/issues/ replace = #

A solution ?

Thanks in advance

hluk commented 6 months ago

What are the formats in the item? You can see the formats by selecting the item and selecting "Show Content..." from context menu (F4 shortcut).

It's possible that there is no "text/plain" format and the URL is stored under "text/uri-list".

ChristopheC13 commented 6 months ago

Hi,

The format is text/plain (see with "Show Content..." from context menu (F4 shortcut)).

I think it's the \ or \ or # that's the problem in the url

A solution to improve the commande of Application/search-and-replace.ini to meet this need ?

Thanks in advance

hluk commented 6 months ago

I think it's the \ or \ or # that's the problem in the url

I tested the command without encountering any problems. I don't see any \ in your example input.

ChristopheC13 commented 6 months ago

Hi,

item (format text/plain) = https://url-example.fr/issues/XXXXX#note-1

find = https://url-example.fr/issues/ replace = #

when I run the command, nothing happens

Thanks in advance