2025-02-15 23:46:51 +06:00

30 lines
904 B
EmacsLisp

(defun i/move-to-new-directory ()
(interactive)
(let ((new-directory (dired-current-directory)))
(with-temp-buffer
(insert-file-contents "/tmp/curr")
(goto-char (point-min))
(while (not (eobp))
(let ((line (thing-at-point 'line t)))
(async-shell-command (concat "mv " (replace-regexp-in-string "\n" "" line) " " new-directory)))
(forward-line 1))
(message "Finish"))))
(defun i/copy-to-new-directory ()
(interactive)
(let ((new-directory (dired-current-directory)))
(with-temp-buffer
(insert-file-contents "/tmp/curr")
(goto-char (point-min))
(while (not (eobp))
(let ((line (thing-at-point 'line t)))
(async-shell-command (concat "copy " (replace-regexp-in-string "\n" "" line) " " new-directory)))
(forward-line 1))
(message "Finish"))))
(defun i/clear-marks ()
(interactive)
(shell-command "rm /tmp/curr"))