`find -exec` in git alias

This alias in .git/config :

 pycat = !find -iname '*.py' -exec cat {} \; 

Gives me this in a shell:

 $ git pycat fatal: bad config file line 19 in .git/config 

I tried quotes, without quotes, switching quote types, overcoming all four levels, but I can't figure out what makes git miserable here.

+2
git find alias
Jun 14 '14 at 2:36 on
source share
1 answer

Says a little hasty that this is a semicolon,

 pycat = !find -iname '*.py' -exec cat {} "\\;" pycat = !find -iname '*.py' -exec cat {} "';'" pycat = "!find -iname '*.py' -exec cat {} \\;" pycat = "!find -iname '*.py' -exec cat {} \";\"" 

everything is working. The semicolon is syntax with comments on el in the old school, which can happen here. Thus, the configuration analyzer uses a single layer of double letters.

(edit: yup . He even talks about this in the document:

The syntax is quite flexible and permissive; spaces are mostly ignored. # And; characters start commenting to the end of the line, blank lines are ignored.

)

+2
Jun 14 '14 at 4:00
source share



All Articles