Hacker News new | ask | show | jobs
by root_axis 539 days ago
I've used wezterm for years and have never done anything fancy with the config, but this sounds awesome. I'd really appreciate it if you could link your config or a similar resource.
1 comments

I just started using wezterm, my config isn't as mature or fancy, but I already found a spot where lua config is making me happy. I added a feature so I can command-click on Github PR numbers in Wezterm to take me to that PR on Github.com. Here's a permalink to the code: https://github.com/justjake/Dotfiles/blob/030c5d2b43e944df55...

The way this works in Wezterm is you can add regexes that match text in the terminal and format that text as links. So, I turn #(\d+) into "GITHUB_PR:$1" and then add a "on link clicked" callback to handle that special URL form by shelling out to `gh pr view --web $1` in the same working directory as the clicked pane.