import version import ips/forkserver let forks = newForkServer() import options import os import terminal import posix when defined(profile): import nimprof import config/config import display/client import utils/opt import utils/twtstr import chakasu/charset let conf = readConfig() set_cjk_ambiguous(conf.display.double_width_ambiguous) let params = commandLineParams() proc version(long: static bool = false): string = result = "Chawan browser v0.1 " when defined(debug): result &= "(debug)" else: result &= "(release)" proc help(i: int) = let s = version() & """ Usage: cha [options] [URL(s) or file(s)...] Options: -- Interpret all following arguments as URLs -d, --dump Print page to stdout -c, --css Pass stylesheet (e.g. -c 'a{color: blue}') -o, --opt Pass config options (e.g. -o 'page.q="QUIT"') -T, --type Specify content mime type -I, --input-charset Specify document charset -O, --display-charset Specify display charset -M, --monochrome Set color-mode to 'monochrome' -V, --visual Visual startup mode -r, --run