summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Harms <danielrharms@gmail.com>2017-04-21 06:40:19 -0500
committerDavid Shepherd <davidshepherd7@gmail.com>2017-04-26 08:48:18 +0100
commit86b3fb5616be1a0a90e21a9b2cade25c62243b5d (patch)
tree9780a3bc720be44a9605e97566a3cbd6372a24db
parentAdd melpa stable badge (diff)
downloademacs-terminal-here-86b3fb5616be1a0a90e21a9b2cade25c62243b5d.tar.gz
Issue 9 - Doesn't work on Darwin; open filenames are relative to default-directory
-rw-r--r--terminal-here.el4
-rw-r--r--test/terminal-here-test.el2
2 files changed, 3 insertions, 3 deletions
diff --git a/terminal-here.el b/terminal-here.el
index 5e144da..bd414c7 100644
--- a/terminal-here.el
+++ b/terminal-here.el
@@ -25,11 +25,11 @@
:group 'external
:prefix "terminal-here-")
-(defun terminal-here-default-terminal-command (dir)
+(defun terminal-here-default-terminal-command (_dir)
"Pick a good default command to use for DIR."
(cond
((eq system-type 'darwin)
- (list "open" "-a" "Terminal.app" dir))
+ (list "open" "-a" "Terminal.app" "."))
;; From http://stackoverflow.com/a/13509208/874671
((memq system-type '(windows-nt ms-dos cygwin))
diff --git a/test/terminal-here-test.el b/test/terminal-here-test.el
index 741eadb..c53c01d 100644
--- a/test/terminal-here-test.el
+++ b/test/terminal-here-test.el
@@ -23,7 +23,7 @@
(ert-deftest osx-default-command ()
(with-terminal-here-mocks
- (mock (start-process "open" * "open" "-a" "Terminal.app" "adir"))
+ (mock (start-process "open" * "open" "-a" "Terminal.app" "."))
(let ((system-type 'darwin))
(custom-reevaluate-setting 'terminal-here-terminal-command)
(terminal-here-launch-in-directory "adir"))))