Add --no-unicode option to draw borders in ASCII characters

Close ##1533
This commit is contained in:
Junegunn Choi
2019-03-29 02:11:03 +09:00
parent e7d60aac9c
commit 75972d59a8
6 changed files with 87 additions and 38 deletions

View File

@@ -195,6 +195,7 @@ type Options struct {
HeaderLines int
Margin [4]sizeSpec
Bordered bool
Unicode bool
Tabstop int
ClearOnExit bool
Version bool
@@ -244,6 +245,7 @@ func defaultOptions() *Options {
Header: make([]string, 0),
HeaderLines: 0,
Margin: defaultMargin(),
Unicode: true,
Tabstop: 8,
ClearOnExit: true,
Version: false}
@@ -1152,6 +1154,10 @@ func parseOptions(opts *Options, allArgs []string) {
opts.Bordered = false
case "--border":
opts.Bordered = true
case "--no-unicode":
opts.Unicode = false
case "--unicode":
opts.Unicode = true
case "--margin":
opts.Margin = parseMargin(
nextString(allArgs, &i, "margin required (TRBL / TB,RL / T,RL,B / T,R,B,L)"))