Re: Re: Adding backslash escapes to find.command
Chris Angelico <[email protected]> Sun, 11 May 2025 11:43:08 +1000
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <CAPTjJmqB7=mhv+VPVeJEw2f5Rtd8eSjTd4EG3Mv82u9PB4iEGQ@mail.gmail.com> |
On Sun, 11 May 2025 at 11:05, scintillaDotOrg <[email protected]> w= rote: > > ChrisA, > > While it looks like there is a single form of variable expansion in SciTE= , there are actually two with separate implementations: variables that depe= nd on a file name and variables that don't. This is most obvious when there= is an explicit wild card before the '=3D' in the properties file like > command.go.*.vala=3D./$(FileName) > but it also occurs indirectly when a variable used in a definition is fil= e name dependent. File-name-dependent variables do not process calls like "= escape" which are processed for other variables. > > For file-name-dependent variables, "props.GetNewExpandString" is commonly= called but for other variables, different methods are called like "props.G= etExpandedString". > Interesting. I'm not sure if the difference matters here, as the part I'm looking at is the non-file-dependent one, right? > You could try changing the implementation of "find.command" in gtk/SciTEG= TK.cxx to allow calling "escape" by switching calls although this may have = unexpected consequences. Then set find.command to something like > > find.command=3Dgit -C "$(find.directory)" grep -n "$(escape find.what)" -= - "$(find.files)" > I had a look at this previously; this is SciTEGTK::FindInFilesCmd in SciTEGTK.cxx. If the find command is blank, a command is constructed that calls on the SciTE executable in grep mode, and notably, it appends Slash(props.GetString("find.what"), true) to get the search string. Is that the same as what $(escape ...) would do? ChrisA --=20 You received this message because you are subscribed to the Google Groups "= scite-interest" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/scite-inter= est/CAPTjJmqB7%3Dmhv%2BVPVeJEw2f5Rtd8eSjTd4EG3Mv82u9PB4iEGQ%40mail.gmail.co= m.