diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-24 23:39:55 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-24 23:39:55 +0200 |
commit | c7bfcef7e0b5b216300622b085bea417478d9c92 (patch) | |
tree | 0c63a658e656b52b3f2317c9766d42a10dd48c60 /src/main.nim | |
parent | 7d7f97b6da90bfed93f9dcab4b480e67715d5d5d (diff) | |
download | chawan-c7bfcef7e0b5b216300622b085bea417478d9c92.tar.gz |
Option -> Opt in config, return error in compileSearchRegex
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.nim b/src/main.nim index 605fba94..225a7578 100644 --- a/src/main.nim +++ b/src/main.nim @@ -12,6 +12,7 @@ import config/config import data/charset import display/client import ips/forkserver +import utils/opt import utils/twtstr let conf = readConfig() @@ -66,7 +67,7 @@ while i < params.len: echo version(true) quit(0) of "-M", "--monochrome": - conf.display.colormode = some(MONOCHROME) + conf.display.colormode.ok(MONOCHROME) of "-V", "--visual": visual = true of "-T", "--type": @@ -92,7 +93,7 @@ while i < params.len: if c == CHARSET_UNKNOWN: stderr.write("Unknown charset " & params[i] & "\n") quit(1) - conf.encoding.display_charset = some(c) + conf.encoding.display_charset.ok(c) else: help(1) of "-": |