On Sun, 11 May 2025 at 11:05, scintillaDotOrg <
scintil...@gmail.com> wrote:
>
> ChrisA,
>
> While it looks like there is a single form of variable expansion in SciTE, there are actually two with separate implementations: variables that depend on a file name and variables that don't. This is most obvious when there is an explicit wild card before the '=' in the properties file like
> command.go.*.vala=./$(FileName)
> but it also occurs indirectly when a variable used in a definition is file 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.GetExpandedString".
>
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/SciTEGTK.cxx to allow calling "escape" by switching calls although this may have unexpected consequences. Then set find.command to something like
>
> find.command=git -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