sample-code: link-the-docs using Modern™️ terminal escape sequences

This commit is contained in:
John 2025-10-22 13:12:55 -04:00
parent 4a2cd9303e
commit 722036dfbb

9
sample-code/link-the-docs.cl Executable file
View File

@ -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!"))
}