Initial project import

This commit is contained in:
Agila Forge Importer committed 2026-07-13 15:20:32 +00:00
commit 23f2d29e32
11957 files changed
+1754577

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
module main
import readline
fn main() {
run() or { panic('${err}') }
}
fn run() ! {
$if windows {
eprintln('skipping on Windows, since raw mode and read_char are not yet implemented.')
return
} $else {
// Explicit comptime block for other OSes than Windows is required to not break compilation on Windows.
mut r := readline.Readline{}
r.enable_raw_mode_nosig()
defer {
r.disable_raw_mode()
}
for {
entered := r.read_char()!
if entered == `q` {
break
}
println('got ${entered}')
}
println('Goodbye.')
}
}