feat(clipboard): pasting from system clipboard can delete original (cut) (#649)
* feat: cut_from_system_clipboard * refactor: shuffle some code around --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
This commit is contained in:
parent
64dbcaa91d
commit
f55ebb0079
3 changed files with 51 additions and 6 deletions
|
|
@ -438,9 +438,15 @@ M.copy_to_system_clipboard = {
|
|||
|
||||
M.paste_from_system_clipboard = {
|
||||
desc = "Paste the system clipboard into the current oil directory",
|
||||
callback = function()
|
||||
require("oil.clipboard").paste_from_system_clipboard()
|
||||
callback = function(opts)
|
||||
require("oil.clipboard").paste_from_system_clipboard(opts and opts.delete_original)
|
||||
end,
|
||||
parameters = {
|
||||
delete_original = {
|
||||
type = "boolean",
|
||||
desc = "Delete the original file after copying",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
M.open_cmdline_dir = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue