[mythtv] use of src->mythtv/mythtv symbolic link

Bill Meek keemllib at gmail.com
Wed Feb 19 15:03:01 UTC 2020


On 2/14/20 12:57 PM, Hans Dingemans wrote:
> I guess the -R is just a bad habit I now have to get rid of, thanks for the
> tip & the script!

I couldn't duplicate the double matches either. Even with -r. -R prints a
warning message for mythtv/src, but still doesn't search src.

Just another way:

git grep excludes ignored files/directories (.gitignore) or un-added files.
Note that after git add some_files, but before git commit, you must append
--cached to search them.

My favorite, but you don't have to create an alias:

   git config --global alias.g "grep --files-with-matches --open-files-in-pager=vi"

Then: git g <search_string> finds files containing search_string and starts
the editor positioned at that string. Great if there aren't many matches, so I
sometimes use git grep <search_string> 1st. From vi[m], :n goes to the next
file and n searches for the same string.

You can use --open-files-in-pager=less rather than vi if you like. You can also
append directories to limit searches, e.g. ... programs libs.

-- 
Bill


More information about the mythtv-dev mailing list