[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning for duplicate definitions
From: |
David Wright |
Subject: |
Re: warning for duplicate definitions |
Date: |
Fri, 8 Jan 2016 10:35:45 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri 08 Jan 2016 at 15:44:32 (+0200), Mike Solomon wrote:
> I’m combining several documents into a large book tonight and I am positive
> that I have:
>
> legato = \markup \italic “legato”
>
> in at least 10 documents. I’d like to consolidate these into a style sheet
> but I’m worried that I’ll miss some, so it’d be useful to issue a warning for
> duplicate definitions in case I miss some. Is this possible?
Depending on how consistent you are with your syntax, find/grep might help.
I keep the following line in my recall buffer:
find ~/LilyScores ~/LilyLib -name \*ly -exec grep -H -i 'x' {} \; | less
so I can replace the x and do a quick (caseless, -i) search for anything
(-H for the filename when only a single file matches).
You could try something like:
find top-of-sources-tree -name \*ly -exec grep -H '\<legato[[:space:]]*=' {} \;
| less
(Other OSes have clones of these tools.)
Cheers,
David.