Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jcf
Created September 21, 2018 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcf/229c5ee9c408beba031b1b4374387a2f to your computer and use it in GitHub Desktop.
Save jcf/229c5ee9c408beba031b1b4374387a2f to your computer and use it in GitHub Desktop.
(defun eshell/j (&rest query)
(require 's)
(let* ((fasd (executable-find "fasd"))
(matches (thread-last (s-join " " query)
(format "%s -ld %s" fasd)
(shell-command-to-string)
(s-trim)
(s-lines)
(mapcar 's-trim))))
(message "Matches: %s" matches)
(when-let (dir (first matches))
(eshell/cd dir))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment