rename paste command to put

This commit is contained in:
Gokcehan 2016-11-06 18:09:18 +03:00
parent daff377f2d
commit ec4cb78535
6 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@ var (
"invert", "invert",
"yank", "yank",
"delete", "delete",
"paste", "put",
"renew", "renew",
"echo", "echo",
"cd", "cd",

10
doc.go
View File

@ -33,7 +33,7 @@ The following commands are provided by lf with default keybindings.
invert (default "v") invert (default "v")
yank (default "y") yank (default "y")
delete (default "d") delete (default "d")
paste (default "p") put (default "p")
renew (default "<c-l>") renew (default "<c-l>")
The following commands are provided by lf without default keybindings. The following commands are provided by lf without default keybindings.
@ -181,11 +181,11 @@ File Operations
lf uses the underlying "cp" and "mv" shell commands for file operations. For lf uses the underlying "cp" and "mv" shell commands for file operations. For
this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy the this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy the
file on the disk, but only records its name to memory. The actual file file on the disk, but only records its name to memory. The actual file
operation takes place when you do the "paste" in which case the "cp" command is operation takes place when you do the "put" in which case the "cp" command is
used. Similarly the "mv" command is used for "delete" (i.e. cut or kill) used. Similarly the "mv" command is used for "delete" (i.e. cut or kill)
followed by "paste". These traditional names (e.g. "yank" and "delete") are followed by "put". These traditional names (e.g. "yank", "delete", and "put")
picked instead of the other common convention (e.g. copy and cut) to resemble are picked instead of the other common convention (e.g. copy and cut) to
the default keybinds for these operations. resemble the default keybinds for these operations.
Opening Files Opening Files

View File

@ -37,7 +37,7 @@ The following commands are provided by lf with default keybindings.
invert (default "v") invert (default "v")
yank (default "y") yank (default "y")
delete (default "d") delete (default "d")
paste (default "p") put (default "p")
renew (default "<c-l>") renew (default "<c-l>")
The following commands are provided by lf without default keybindings. The following commands are provided by lf without default keybindings.
@ -194,11 +194,11 @@ File Operations
lf uses the underlying "cp" and "mv" shell commands for file operations. For lf uses the underlying "cp" and "mv" shell commands for file operations. For
this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy
the file on the disk, but only records its name to memory. The actual file the file on the disk, but only records its name to memory. The actual file
operation takes place when you do the "paste" in which case the "cp" command operation takes place when you do the "put" in which case the "cp" command
is used. Similarly the "mv" command is used for "delete" (i.e. cut or kill) is used. Similarly the "mv" command is used for "delete" (i.e. cut or kill)
followed by "paste". These traditional names (e.g. "yank" and "delete") are followed by "put". These traditional names (e.g. "yank", "delete", and
picked instead of the other common convention (e.g. copy and cut) to "put") are picked instead of the other common convention (e.g. copy and cut)
resemble the default keybinds for these operations. to resemble the default keybinds for these operations.
Opening Files Opening Files

View File

@ -309,9 +309,9 @@ func (e *CallExpr) eval(app *App, args []string) {
app.ui.message = fmt.Sprintf("%d files saved for move", len(app.nav.marks)) app.ui.message = fmt.Sprintf("%d files saved for move", len(app.nav.marks))
} }
app.nav.marks = make(map[string]bool) app.nav.marks = make(map[string]bool)
case "paste": case "put":
if err := app.nav.paste(); err != nil { if err := app.nav.put(); err != nil {
msg := fmt.Sprintf("paste: %s", err) msg := fmt.Sprintf("put: %s", err)
app.ui.message = msg app.ui.message = msg
log.Printf(msg) log.Printf(msg)
return return

2
nav.go
View File

@ -444,7 +444,7 @@ func (nav *Nav) save(keep bool) error {
return nil return nil
} }
func (nav *Nav) paste() error { func (nav *Nav) put() error {
list, keep, err := loadFiles() list, keep, err := loadFiles()
if err != nil { if err != nil {
return err return err

View File

@ -54,7 +54,7 @@ func init() {
gOpts.keys["v"] = &CallExpr{"invert", nil} gOpts.keys["v"] = &CallExpr{"invert", nil}
gOpts.keys["y"] = &CallExpr{"yank", nil} gOpts.keys["y"] = &CallExpr{"yank", nil}
gOpts.keys["d"] = &CallExpr{"delete", nil} gOpts.keys["d"] = &CallExpr{"delete", nil}
gOpts.keys["p"] = &CallExpr{"paste", nil} gOpts.keys["p"] = &CallExpr{"put", nil}
gOpts.keys["<c-l>"] = &CallExpr{"renew", nil} gOpts.keys["<c-l>"] = &CallExpr{"renew", nil}
gOpts.cmds = make(map[string]Expr) gOpts.cmds = make(map[string]Expr)