From 9880104c12bd184169c473e204943f25191d45b2 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Fri, 17 Jul 2020 02:17:24 +0300 Subject: [PATCH] quote filenames in prompts --- eval.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval.go b/eval.go index 77b4c40..4c2bf8b 100644 --- a/eval.go +++ b/eval.go @@ -763,9 +763,9 @@ func (e *callExpr) eval(app *app, args []string) { } if selections := len(fileOrSelections); selections == 1 { - app.ui.cmdPrefix = "delete " + fileOrSelections[0] + " [y/N]? " + app.ui.cmdPrefix = "delete '" + fileOrSelections[0] + "' ? [y/N] " } else { - app.ui.cmdPrefix = "delete " + strconv.Itoa(selections) + " items [y/N]? " + app.ui.cmdPrefix = "delete " + strconv.Itoa(selections) + " items? [y/N] " } } app.ui.loadFile(app.nav) @@ -1141,7 +1141,7 @@ func (e *callExpr) eval(app *app, args []string) { newDir := filepath.Dir(newPath) if _, err := os.Stat(newDir); os.IsNotExist(err) { - app.ui.cmdPrefix = "create " + newDir + "?[y/N]" + app.ui.cmdPrefix = "create '" + newDir + "' ? [y/N] " return } @@ -1152,7 +1152,7 @@ func (e *callExpr) eval(app *app, args []string) { } if newStat, err := os.Stat(newPath); !os.IsNotExist(err) && !os.SameFile(oldStat, newStat) { - app.ui.cmdPrefix = "replace " + newPath + "?[y/N]" + app.ui.cmdPrefix = "replace '" + newPath + "' ? [y/N] " return }