Unify [y/N] prompts (#2212)
This commit is contained in:
1 parent
8a8f8180af
commit
a949d4a5d1
3 files changed
+5
-4
No files matched your search
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
# }}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user