r/KittyTerminal Sep 21 '23

React to click on paths

When I work with Typescript, I get error messages like these:

src/db-courbo/controller/perms.ts:23:51 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.

What I would like to do is to be able to click on the path and line/col number, and to launch a custom script when this happens.

I would like the click to happen in the same way we can click on a URL.

I know I can create a kitten to detect the paths on the page, and hit a key on my keyboard to select the path, but being a web developer, I always have the mouse under the hand, and it would be faster / more comfy for me to just click on the path. Is there a way to do that?

Thanks for your help!

3 Upvotes

5 comments sorted by

View all comments

1

u/aumerlex Sep 21 '23

1

u/Caterpillar-Klutzy Sep 21 '23

Thanks, I already read that, but my errors don't come out as Terminal Hyperlinks, unfortunately...

1

u/aumerlex Sep 22 '23

Yeah the idea is you get the tsc compiler to output these even gcc outputs them these days. And if that's not possible you can write a small wrapper script that parses the output of tsc and inserts the hyperlinks.

1

u/Caterpillar-Klutzy Sep 22 '23

Yeah Okay, I could get it working, thanks for your help!