- title: Hyperlink escape codes
- url: https://notes.billmill.org/programming/bash/Hyperlink_escape_codes.html
- hash_url: f68e9507784b5baf1584085908d60f58
- archive_date: 2024-03-13
- og_image:
- description: To print out a clickable hyperlink in a terminal
- favicon: https://notes.billmill.org/favicon.ico
- language: en_US
-
- <p>To print out a clickable hyperlink in a [terminal that supports] the <a href="https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda">OSC8 escape code</a>, use:</p>
- <pre><code><p class="highlight">printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
- </p></code></pre>
- <p>Found via trying to get the <a href="https://notes.billmill.org/computer_usage/git/gh.html">gh</a> cli to output nicer code search results that I can get more context from</p>
|