diff --git a/CHANGELOG.md b/CHANGELOG.md index a377789d..68256cb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - The history file will no longer contain a space between the prefix and the actual command (e.g. `:quit` instead of `: quit`) for each line (#2161). The command `sed -i -E 's/^(.) /\1/' ~/.local/share/lf/history` can be run to make an existing history file compatible with the new format. - The `cmd-history-next` and `cmd-history-prev` commands will now select only matching entries if part of the command is typed beforehand (#2161). Consecutive duplicate entries will also be skipped for convenience. - The string representation of commands shown when displaying keybindings is simplified (e.g. `cd ~` instead of `cd -- [~]`) (#2165). +- `yes-no-prompts` now use the same design everywhere (#2212). ### Added diff --git a/etc/lfrc.example b/etc/lfrc.example index caa5ad4d..8eea3058 100644 --- a/etc/lfrc.example +++ b/etc/lfrc.example @@ -66,7 +66,7 @@ cmd trash %set -f; mv -t ~/.trash $fx # cmd delete ${{ # set -f # printf "$fx\n" -# printf "delete?[y/n]" +# printf "delete? [y/N] " # read ans # [ "$ans" = "y" ] && rm -rf $fx # }} diff --git a/eval.go b/eval.go index bdcd6ce2..ece69195 100644 --- a/eval.go +++ b/eval.go @@ -1335,7 +1335,7 @@ func (e *callExpr) eval(app *app, args []string) { } normal(app) if len(list) == 1 { - app.ui.cmdPrefix = "delete '" + list[0] + "' ? [y/N] " + app.ui.cmdPrefix = "delete '" + list[0] + "'? [y/N] " } else { app.ui.cmdPrefix = "delete " + strconv.Itoa(len(list)) + " items? [y/N] " } @@ -1980,7 +1980,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 } @@ -1990,7 +1990,7 @@ func (e *callExpr) eval(app *app, args []string) { return } if newStat, err := os.Lstat(newPath); !os.IsNotExist(err) && !os.SameFile(oldStat, newStat) { - app.ui.cmdPrefix = "replace '" + newPath + "' ? [y/N] " + app.ui.cmdPrefix = "replace '" + newPath + "'? [y/N] " return }