# Clickable error numbers in alacritty

**URL:** <https://discourse.haskell.org/t/clickable-error-numbers-in-alacritty/10643>\
**Category:** Show and Tell\
**Created:** [October 30, 2024, 4:51pm UTC](https://discourse.haskell.org/t/clickable-error-numbers-in-alacritty/10643 "2024-10-30T16:51:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flip101](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@flip101](https://discourse.haskell.org/u/flip101)\
**Post date:** [October 30, 2024, 4:51pm UTC](https://discourse.haskell.org/t/clickable-error-numbers-in-alacritty/10643/1 "2024-10-30T16:51:14Z")

</div>

For people using alacritty and using GHC version 9.6 or higher, but lower than 9.10 here is a script that makes the GHC error numbers in compiler errors clickable. GHC 9.10 uses terminal escape codes to make them clickable so this script is not needed for that version.

open-ghc-error.sh

```haskell
#!/usr/bin/env bash
xdg-open "https://errors.haskell.org/messages/$1"

```

alacritty.toml

```haskell
[hints]
  [[hints.enabled]]
  command = "xdg-open"
  hyperlinks = true
  post_processing = true
  persist = false
  mouse.enabled = true
  binding = { key = "O", mods = "Control|Shift" }
  regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"

  [[hints.enabled]]
  command = { program = "/home/user/.config/alacritty/open-ghc-error.sh" }
  mouse.enabled = true
  regex = "GHC-\\d+"

```

The first `hints.enabled` is there to not break existing functionality. See the default section at [Alacritty](https://alacritty.org/config-alacritty.html#hints)

run

```haskell
chmod +x open-ghc-error.sh

```

---

<div class="post-metadata">

**Author:** ![eldritch-cookie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/eldritch-cookie/32/4130_2.png) [@eldritch-cookie](https://discourse.haskell.org/u/eldritch-cookie)\
**Post date:** [October 31, 2024, 1:00pm UTC](https://discourse.haskell.org/t/clickable-error-numbers-in-alacritty/10643/2 "2024-10-31T13:00:17Z")

</div>

TIL: ghc 9.10 links to ghc error index
