From 57bebef804f1de4cb7ab826bb85a175a1e503688 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Tue, 13 Sep 2016 22:56:03 +0300 Subject: [PATCH] use recursive and backup options for paste --- nav.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nav.go b/nav.go index 17c0e70..77f9c90 100644 --- a/nav.go +++ b/nav.go @@ -387,15 +387,20 @@ func (nav *Nav) paste() error { dir := nav.currDir() - args := append(list, dir.path) + var args []string var sh string if keep { sh = "cp" + args = append(args, "-r") } else { sh = "mv" } + args = append(args, "--backup=numbered") + args = append(args, list...) + args = append(args, dir.path) + cmd := exec.Command(sh, args...) if err := cmd.Run(); err != nil {