blob: 347ba75821ffce33081cda8f3c4841139d969677 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
module vhelp
import os
pub fn show_topic(topic string) {
vexe := os.real_path(os.getenv('VEXE'))
vroot := os.dir(vexe)
target_topic := os.join_path(vroot, 'cmd', 'v', 'help', '${topic}.txt')
content := os.read_file(target_topic) or {
eprintln('Unknown topic: $topic')
exit(1)
}
println(content)
}
|