[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3de074a 049/399: counsel.el (counsel-find-file-copy): Add
From: |
Oleh Krehel |
Subject: |
[elpa] master 3de074a 049/399: counsel.el (counsel-find-file-copy): Add and bind. |
Date: |
Sat, 20 Jul 2019 14:56:46 -0400 (EDT) |
branch: master
commit 3de074a612326ea7b9967ac899151392934b9e50
Author: Brian Leung <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-find-file-copy): Add and bind.
Fixes #1955
---
counsel.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/counsel.el b/counsel.el
index 349762b..9706ade 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1815,6 +1815,16 @@ choose between `yes-or-no-p' and `y-or-n-p'; otherwise
default to
#'yes-or-no-p)
(apply #'format fmt args)))
+(defun counsel-find-file-copy (x)
+ "Copy file X."
+ (ivy-read "Copy file to: " #'read-file-name-internal
+ :matcher #'counsel--find-file-matcher
+ :action (lambda (new-name)
+ (require 'dired-aux)
+ (dired-copy-file x new-name 1))
+ :keymap counsel-find-file-map
+ :caller 'counsel-find-file-copy))
+
(defun counsel-find-file-delete (x)
"Delete file X."
(when (or delete-by-moving-to-trash
@@ -1846,6 +1856,7 @@ choose between `yes-or-no-p' and `y-or-n-p'; otherwise
default to
("x" counsel-find-file-extern "open externally")
("r" counsel-find-file-as-root "open as root")
("k" counsel-find-file-delete "delete")
+ ("c" counsel-find-file-copy "copy file")
("m" counsel-find-file-move "move or rename")
("d" counsel-find-file-mkdir-action "mkdir")))
- [elpa] master 22fca55 035/399: counsel.el (counsel-file-jump-args): Remove extra backslash, (continued)
- [elpa] master 22fca55 035/399: counsel.el (counsel-file-jump-args): Remove extra backslash, Oleh Krehel, 2019/07/20
- [elpa] master 16367fc 033/399: ivy.el (ivy-call): Call ivy-recursive-restore even if no action, Oleh Krehel, 2019/07/20
- [elpa] master a664943 043/399: BSDs should default to locate not using regular expressions, Oleh Krehel, 2019/07/20
- [elpa] master bedeb02 040/399: Move counsel-read-env to ivy mode, Oleh Krehel, 2019/07/20
- [elpa] master 2a02343 036/399: counsel.el (counsel-file-jump): Fix file expansion, Oleh Krehel, 2019/07/20
- [elpa] master f0b2bc6 037/399: Update ivy-help.org, Oleh Krehel, 2019/07/20
- [elpa] master da9d937 041/399: ivy.el (ivy-call): Allow ivy-inhibit-action to be a function, Oleh Krehel, 2019/07/20
- [elpa] master c38daa3 039/399: Enable counsel-read-env to work in read-file-name, Oleh Krehel, 2019/07/20
- [elpa] master e88c7d6 044/399: counsel.el (counsel-locate-cmd): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 51c5874 042/399: counsel.el (counsel-find-file-map): Bind "`" to bookmarks, Oleh Krehel, 2019/07/20
- [elpa] master 3de074a 049/399: counsel.el (counsel-find-file-copy): Add and bind.,
Oleh Krehel <=
- [elpa] master a538df1 053/399: ivy.el (ivy-make-magic-action): Point doc to the action function, Oleh Krehel, 2019/07/20
- [elpa] master 84b5ece 050/399: counsel.el (counsel-find-file-copy): Use ivy-inhibit-action, Oleh Krehel, 2019/07/20
- [elpa] master 9e3c855 052/399: ivy.el (ivy-make-magic-action): Fix bug, Oleh Krehel, 2019/07/20
- [elpa] master 9cf3f08 045/399: swiper.el (swiper-use-visual-line-p): New variable, Oleh Krehel, 2019/07/20
- [elpa] master 15e2c88 051/399: Restore buffer-list after counsel-switch-buffers, Oleh Krehel, 2019/07/20
- [elpa] master 80d40e4 046/399: Dynamically handle grep tool look-arounds, Oleh Krehel, 2019/07/20
- [elpa] master 0a4ad42 047/399: ivy-test.el (counsel--grep-regex): Add test for negative lookahead, Oleh Krehel, 2019/07/20
- [elpa] master 5f4e944 057/399: counsel.el: Fix finding dominating file, Oleh Krehel, 2019/07/20
- [elpa] master 3c16fa1 055/399: counsel.el (counsel-compile): Clean up, Oleh Krehel, 2019/07/20
- [elpa] master 876b4ac 059/399: counsel.el (counsel-compile): Minor cleanup, Oleh Krehel, 2019/07/20