keep copy selections after paste (#745)
This commit is contained in:
parent
958857f4c4
commit
a4842e19d4
4
doc.go
4
doc.go
@ -1098,9 +1098,9 @@ You can use the following example as a starting point:
|
||||
cp -R $list .
|
||||
elif [ $mode = 'move' ]; then
|
||||
mv $list .
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
fi
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
Some useful things to be considered are to use the backup ('--backup') and/or preserve attributes ('-a') options with 'cp' and 'mv' commands if they support it (i.e. GNU implementation), change the command type to asynchronous, or use 'rsync' command with progress bar option for copying and feed the progress to the client periodically with remote 'echo' calls.
|
||||
|
@ -1215,9 +1215,9 @@ point:
|
||||
cp -R $list .
|
||||
elif [ $mode = 'move' ]; then
|
||||
mv $list .
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
fi
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
}}
|
||||
|
||||
Some useful things to be considered are to use the backup ('--backup')
|
||||
|
4
lf.1
4
lf.1
@ -1272,9 +1272,9 @@ You can customize copy and move operations by defining a 'paste' command. This i
|
||||
cp -R $list .
|
||||
elif [ $mode = 'move' ]; then
|
||||
mv $list .
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
fi
|
||||
rm ~/.local/share/lf/files
|
||||
lf -remote 'send clear'
|
||||
}}
|
||||
.EE
|
||||
.PP
|
||||
|
23
nav.go
23
nav.go
@ -1043,19 +1043,18 @@ func (nav *nav) paste(ui *ui) error {
|
||||
go nav.copyAsync(ui, srcs, dstDir)
|
||||
} else {
|
||||
go nav.moveAsync(ui, srcs, dstDir)
|
||||
}
|
||||
|
||||
if err := saveFiles(nil, false); err != nil {
|
||||
return fmt.Errorf("clearing copy/cut buffer: %s", err)
|
||||
}
|
||||
|
||||
if gSingleMode {
|
||||
if err := nav.sync(); err != nil {
|
||||
return fmt.Errorf("paste: %s", err)
|
||||
if err := saveFiles(nil, false); err != nil {
|
||||
return fmt.Errorf("clearing copy/cut buffer: %s", err)
|
||||
}
|
||||
} else {
|
||||
if err := remote("send sync"); err != nil {
|
||||
return fmt.Errorf("paste: %s", err)
|
||||
|
||||
if gSingleMode {
|
||||
if err := nav.sync(); err != nil {
|
||||
return fmt.Errorf("paste: %s", err)
|
||||
}
|
||||
} else {
|
||||
if err := remote("send sync"); err != nil {
|
||||
return fmt.Errorf("paste: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user