embark icon indicating copy to clipboard operation
embark copied to clipboard

Feature request: strip filename and line number from consult-grep candidate

Open blahgeek opened this issue 5 months ago • 2 comments

When acting on candidates of consult-grep or consult-ripgrep, the target contains <filename>:<linenumber>: prefix. It would be useful if the prefix can be optionally stripped. (I usually use embark-copy-as-kill in this case and find myself needing to remove those extra chars)

blahgeek avatar Jul 26 '25 09:07 blahgeek

I don't think this is a good idea. Candidates should be copied as is (except for invisible tofus used by Consult).

minad avatar Oct 06 '25 13:10 minad

Well, embark-copy-as-kill certainly needs to keep that information since it's job is to copy completion candidates (except for tofus, which are a consult implementation detail that embark cooperates with by removing, as @minad says). I would suggest writing a custom action that does remove them. If you do, you could add it to the wiki.

oantolin avatar Oct 10 '25 02:10 oantolin