Skip to content
Myr

Do not validate other options when --version is present

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Close #2690

authored by Junegunn Choi · committed by Junegunn Choi · parent 7a7cfca · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:src/options.go+7 added
1744 unmodified lines
1745// ParseOptions parses command-line options1746func ParseOptions() *Options {1747 opts := defaultOptions()17481749 for _, arg := range os.Args[1:] {1750 if arg == "--version" {1751 opts.Version = true1752 return opts1753 }1754 }17551756 // Options from Env var1757 words, _ := shellwords.Parse(os.Getenv("FZF_DEFAULT_OPTS"))1758 if len(words) > 0 {1759 parseOptions(opts, words)
8 unmodified lines