deadgrep
deadgrep copied to clipboard
Git submodules awareness
Hi!
Recently deadgrep stopped aware git submodules: when I run search inside git submodule, dedagrep will search in outer project space (main git repo).
For example, I have such project structure:
main_project_repo (main git repo)
\ - - apps (git submodules)
\ -- app1 (git submodule)
\ -- app2 (git submodule)
...... ......
in my .emacs
I have such dedagrep settings:
(global-set-key (kbd "<f5>") #'deadgrep)
so, e.g. my current workdir is ~/main_project_repo/apps/app1
and when I press <f5>
deadgrep ask me about "Search term" and then, it will search in ~/main_project_repo/
instead of expected ~/main_project_repo/apps/app1
. It's little bit annoying cos every time when I want to search smth in git submodule (limit search to submodule directory), it will run in outer, main project directory and I need to do extra actions: change the directory to subdirectory of current submodule...
deadgrep-debug
output:
Platform: gnu/linux
Emacs version: 27.1
Command: rg --color=ansi --line-number --no-heading --with-filename --fixed-strings --smart-case -- sdfsdfsdfsdf .
default-directory: "~/projects/bigproject/"
Initial output from ripgrep:
nil
ripgrep
version: 12.1.1
P.S.
Thanks a lot for such a cool tool, it really really save a lot of my working time! =)