dired-rsync icon indicating copy to clipboard operation
dired-rsync copied to clipboard

How do I set up a shortcut to sync two fixed locations?

Open SreenivasVRao opened this issue 4 years ago • 1 comments

I would like to have a way to sync two directories

so something like

(defun my-dired-sync-workflow(src dst) ...)

(global-set-key (kbd ...) 'my-dired-sync-workflow)

and probably have a set of fixed values for src and dst - I'm thinking of using some hacky setq for now since I only have one src and dst pair I care about.

SreenivasVRao avatar Aug 26 '20 01:08 SreenivasVRao

You could probably hack something up by let binding dired-rsync-source-files to provide your list of files and then calling dired-rsync. Something like (untested):

(defun my-dired-rsync-workflow()
  (interactive)
  (let ((dired-rsync-source-files (lambda()
                                    "tramp-path-from-source")))
    (dired-rsync "tramp-path-to-dest")))
  

stsquad avatar Aug 27 '20 21:08 stsquad