cleanup
This commit is contained in:
parent
f8daa60b31
commit
a6544757db
6
eval.go
6
eval.go
@ -233,7 +233,7 @@ func (e *setExpr) eval(app *app, args []string) {
|
|||||||
toks := strings.Split(e.val, ":")
|
toks := strings.Split(e.val, ":")
|
||||||
for _, s := range toks {
|
for _, s := range toks {
|
||||||
if s == "" {
|
if s == "" {
|
||||||
app.ui.echoerrf("hiddenfiles: glob should be non-empty")
|
app.ui.echoerr("hiddenfiles: glob should be non-empty")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err := filepath.Match(s, "a")
|
_, err := filepath.Match(s, "a")
|
||||||
@ -315,8 +315,8 @@ func (e *setExpr) eval(app *app, args []string) {
|
|||||||
case "timefmt":
|
case "timefmt":
|
||||||
gOpts.timefmt = e.val
|
gOpts.timefmt = e.val
|
||||||
case "truncatechar":
|
case "truncatechar":
|
||||||
if runeSliceWidth([]rune(e.val)) > 1 {
|
if runeSliceWidth([]rune(e.val)) != 1 {
|
||||||
app.ui.echoerr("truncatechar: value should be 1 character long")
|
app.ui.echoerr("truncatechar: value should be a single character")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user