diff options
-rw-r--r-- | emacs | 15 | ||||
-rw-r--r-- | emacs.elc | bin | 10792 -> 11153 bytes |
2 files changed, 15 insertions, 0 deletions
@@ -419,3 +419,18 @@ If this is set during find-file, flyspell mode gets enabled automaticaly.") (call-process "wmctrl" nil nil nil "-i" "-R" (frame-parameter (or frame (selected-frame)) 'outer-window-id))) + +;; quick open shell +(defun dirname (file) + (replace-regexp-in-string "[^/]*$" "" file)) + +(defun open-buffer-shell () + (interactive) + (if buffer-file-name + (start-process-shell-command + "urxvt" + nil + (concat "DIR=" (dirname buffer-file-name) " urxvt")) + (message "Buffer does not contain a file."))) + +(global-set-key (kbd "<f12>") 'open-buffer-shell) Binary files differ |