Skip to content
Myr

Do not print the entire --help on invalid option

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

authored by Junegunn Choi · committed by Junegunn Choi · parent fdbf3d3 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/options.go+1 added-1 removed
179 unmodified lines
180}181182func errorExit(msg string) {183 os.Stderr.WriteString(msg + "\n")184 help(1)184 os.Exit(1)185}186187func optString(arg string, prefixes ...string) (bool, string) {188 for _, prefix := range prefixes {
645 unmodified lines