summaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
Diffstat (limited to '.emacs')
-rw-r--r--.emacs7
1 files changed, 7 insertions, 0 deletions
diff --git a/.emacs b/.emacs
index 961611d..3a5550a 100644
--- a/.emacs
+++ b/.emacs
@@ -42,6 +42,7 @@
(global-set-key (kbd "C-c f") 'auto-fill-mode)
(global-set-key (kbd "C-c k f") 'my/kill-ring-filename)
(global-set-key (kbd "C-c k |") 'my/kill-ring-pipe-region)
+(global-set-key (kbd "C-c k !") 'my/kill-ring-shell)
(global-set-key (kbd "C-c m") 'man)
(global-set-key (kbd "C-c p") 'electric-pair-mode)
(global-set-key (kbd "C-c t") 'toggle-truncate-lines)
@@ -218,6 +219,12 @@
t t nil shell-command-switch command)
(kill-new (buffer-string)))))
+(defun my/kill-ring-shell (command)
+ (interactive (list (read-shell-command "Shell command: ")))
+ (with-temp-buffer
+ (call-process-shell-command command nil t)
+ (kill-new (buffer-string))))
+
(defun my/froggify ()
(ispell-change-dictionary "fr")
(setq-local colon-double-space nil)