From c35e7471a33df0e1d37522dc7aad42df9efc40c6 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 17 May 2018 11:05:01 +0300 Subject: terminal-here: Implement directory specification. * terminal-here.el (terminal-here-launch)[directory]: New argument. --- terminal-here.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/terminal-here.el b/terminal-here.el index 2107dfd..e504a54 100644 --- a/terminal-here.el +++ b/terminal-here.el @@ -228,14 +228,16 @@ Given a tramp path returns the local part, otherwise returns nil." (user-error (format "No `%S' is set." ',symbol)))) ;;;###autoload -(defun terminal-here-launch (&optional multiplexer) +(defun terminal-here-launch (&optional directory multiplexer) "Launch a terminal in the current working directory. This is the directory of the current buffer unless you have changed it by running `cd'." - (interactive) + (interactive + (list (if current-prefix-arg (read-directory-name "Directory: ") + default-directory))) (when multiplexer (terminal-here-not-null-symbol terminal-here-multiplexer)) - (terminal-here-launch-in-directory default-directory multiplexer)) + (terminal-here-launch-in-directory directory multiplexer)) ;;;###autoload (defalias 'terminal-here 'terminal-here-launch) -- cgit v1.2.3