added ':delete' builtin command (#121)

* added ':delete' command

* fixed doc

* fixed typo

* added dummy function for delete for windows

* detacted the functionality from the OS

* now deletion works based on selections

* added effective selection

* delete no longer sends 'send sync'

* fixed typo

* fixed typo

* added DOC to effective selection

* added DOC to deleteFiles()

* fixed DOC typos

* added ability to overwrite :delete

* added ability to overwrite :delete
This commit is contained in:
Kallinteris Andreas authored and gokcehan committed 2018-12-29 20:14:20 +03:00
1 parent 3efdfd3bca
commit 7e3f92f049
6 files changed
+49

No files matched your search

+11
View File
@@ -582,6 +582,17 @@ func (e *callExpr) eval(app *app, args []string) {
if err := sendRemote("send sync"); err != nil {
app.ui.printf("paste: %s", err)
}
case "delete":
if cmd, ok := gOpts.cmds["delete"]; ok {
cmd.eval(app, e.args)
} else if err := app.nav.deleteFiles(); err != nil {
app.ui.printf("delete: %s", err)
return
}
app.nav.unselect()
if err := sendRemote("send load"); err != nil {
app.ui.printf("delete: %s", err)
}
case "clear":
if err := saveFiles(nil, false); err != nil {
app.ui.printf("clear: %s", err)