Skip to content

Instantly share code, notes, and snippets.

@jaycfields
Created March 29, 2013 18:21
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 jaycfields/5272575 to your computer and use it in GitHub Desktop.
Save jaycfields/5272575 to your computer and use it in GitHub Desktop.
(defun grep-string-in (s project-root)
(interactive (list (read-string "string: ")
(read-directory-name
"Project Root: "
(locate-dominating-file default-directory "project.clj"))))
(message (concat s project-root))
(let* ((cmd (concat "grep -nH -e " s " -R " project-root)))
(setq last-run-grep cmd)
(grep cmd)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment