diff --git a/dumb-jump.el b/dumb-jump.el index b65df13..76ff562 100644 --- a/dumb-jump.el +++ b/dumb-jump.el @@ -2112,8 +2112,7 @@ to keep looking for another root." (dumb-jump-git-grep-installed?) (dumb-jump-grep-installed?))) (dumb-jump-issue-result "nogrep")) - ((or (string= (buffer-name) "*shell*") - (string= (buffer-name) "*eshell*")) + ((derived-mode-p 'shell-mode 'eshell-mode) (dumb-jump-fetch-shell-results prompt)) ((and (not prompt) (not (region-active-p)) (not (thing-at-point 'symbol))) (dumb-jump-issue-result "nosymbol")) diff --git a/test/dumb-jump-test.el b/test/dumb-jump-test.el index bbad6a2..1510ee1 100644 --- a/test/dumb-jump-test.el +++ b/test/dumb-jump-test.el @@ -491,6 +491,7 @@ (let* ((go-js-file (f-join test-data-dir-proj1 "src" "js" "fake.js")) (default-directory test-data-dir-proj1)) (with-current-buffer (get-buffer-create "*shell*") + (shell-mode) (insert ".js doSomeStuff()") (goto-char (point-min)) (forward-char 6)