From 722036dfbb4c7ed98e1dcb4998632ad21100ad48 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 22 Oct 2025 13:12:55 -0400 Subject: [PATCH] sample-code: link-the-docs using Modern:tm: terminal escape sequences --- sample-code/link-the-docs.cl | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 sample-code/link-the-docs.cl diff --git a/sample-code/link-the-docs.cl b/sample-code/link-the-docs.cl new file mode 100755 index 0000000..88eb8e2 --- /dev/null +++ b/sample-code/link-the-docs.cl @@ -0,0 +1,9 @@ +#!/usr/bin/env -S conlang -r false + +fn link (link, text) -> &str + "\x1b]8;;" + link + "\x1b\\" + text + "\x1b]8;;\x1b\\"; + +fn main () { + println(link("https://conlang.foo/docs", "Here's a link to the docs!")); + println(link("https://conlang.foo/source", "Here's a link to the source!")) +}