deadgrep icon indicating copy to clipboard operation
deadgrep copied to clipboard

Consider preserving the directory from the last search in the current directory

Open Wilfred opened this issue 7 years ago • 2 comments
trafficstars

If users regularly search the same subdirectory, it would be nice to remember that.

This behaviour would be consistent with our other setting preservations (e.g. case sensitivity).

Wilfred avatar Oct 24 '18 15:10 Wilfred

Is there a way to make deadgrep always begin a search from the current directory (pwd)? My usual workflow is to begin a search from the directory that I want to search, not the last directory I searched. But as it is, I must first do C-u M-x deadgrep, manually change the search directory to my current directory, then press g to begin the search. This makes things very difficult for me. Any chance we could get an option "Always use pwd". Thanks, Patrick

Patrick-T-Anderson avatar Feb 01 '19 17:02 Patrick-T-Anderson

@Patrick-T-Anderson I think it can be easily done with:

(defun deadgrep-here (search-term)
  "Start deadgrep from the current working directory."
  (interactive (list (deadgrep--read-search-term)))
  (deadgrep search-term default-directory))

To1ne avatar Feb 16 '22 19:02 To1ne