use recursive and backup options for paste
This commit is contained in:
parent
9c2f594a6b
commit
57bebef804
7
nav.go
7
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user