summaryrefslogtreecommitdiffstats
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2017-03-04 11:29:31 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2017-03-04 11:29:31 +0900
commit53348feb8959754497453232ffacd4bd3f1154ea (patch)
treef1fd030b9e2f6ab8afbe4ea70968a929c567b083 /src/options.go
parent337cdbb37c1efc49b09b4cacc6e9ee1369c7d76d (diff)
Add --no-clear option
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go
index c78d2bfe..7a3d60cb 100644
--- a/src/options.go
+++ b/src/options.go
@@ -186,6 +186,7 @@ type Options struct {
Margin [4]sizeSpec
Bordered bool
Tabstop int
+ ClearOnExit bool
Version bool
}
@@ -234,6 +235,7 @@ func defaultOptions() *Options {
HeaderLines: 0,
Margin: defaultMargin(),
Tabstop: 8,
+ ClearOnExit: true,
Version: false}
}
@@ -1099,6 +1101,10 @@ func parseOptions(opts *Options, allArgs []string) {
nextString(allArgs, &i, "margin required (TRBL / TB,RL / T,RL,B / T,R,B,L)"))
case "--tabstop":
opts.Tabstop = nextInt(allArgs, &i, "tab stop required")
+ case "--clear":
+ opts.ClearOnExit = true
+ case "--no-clear":
+ opts.ClearOnExit = false
case "--version":
opts.Version = true
default: