Re: Re: Adding backslash escapes to find.command
scintillaDotOrg <[email protected]> Sun, 11 May 2025 15:54:47 -0700 (PDT)
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_314436_326323403.1747004087056
Content-Type: multipart/alternative;
boundary="----=_Part_314437_102964274.1747004087056"
------=_Part_314437_102964274.1747004087056
Content-Type: text/plain; charset="UTF-8"
ChrisA:
I'm looking at is the non-file-dependent one, right?
No, find.command for GTK is currently implemented with GetNewExpandString.
It's likely this was done as it is a command and most commands can be
differentiated by file type although find.command does not currently allow
a pattern like find.command.*.c.
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?
Its similar but $(escape ...) uses ShellEscape, not Slash which is more
oriented towards making control characters visible and less towards
avoiding shell features. A difficulty here is that a different set of
escapes is needed based on context, such as the OS; the command language
being executed; and whether the value is inside quotes.
Neil
--
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 email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scite-interest/c128b3eb-3d35-4b85-93d3-e6fd9ee7a2f0n%40googlegroups.com.
------=_Part_314437_102964274.1747004087056
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<span style=3D"color: rgb(80, 0, 80);">ChrisA:</span><div><font color=3D"#5=
00050"><br /></font><div><blockquote style=3D"margin: 0px 0px 0px 0.8ex; bo=
rder-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I'm looking at=
is the non-file-dependent one, right?</blockquote><div><br /></div><div>No=
, find.command for GTK is currently implemented with=C2=A0GetNewExpandStrin=
g. It's likely this was done as it is a command and most commands can be di=
fferentiated by file type although find.command does not currently allow a =
pattern like find.command.*.c.</div><div><br /></div><blockquote style=3D"m=
argin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); paddin=
g-left: 1ex;">I had a look at this previously; this is SciTEGTK::FindInFile=
sCmd in
<br />SciTEGTK.cxx. If the find command is blank, a command is constructed
<br />that calls on the SciTE executable in grep mode, and notably, it
<br />appends Slash(props.GetString("find.what"), true) to get the search
<br />string. Is that the same as what $(escape ...) would do?</blockquote>=
<div><br /></div><div>Its similar but $(escape ...)=C2=A0uses=C2=A0ShellEsc=
ape, not Slash which is more oriented towards making control characters vis=
ible and less towards avoiding shell features. A difficulty here is that a =
different set of escapes is needed based on context, such as the OS; the co=
mmand language being executed; and whether the value is inside quotes.</div=
><div><br /></div><div>Neil</div></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;scite-interest" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">scit=
[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
scite-interest/c128b3eb-3d35-4b85-93d3-e6fd9ee7a2f0n%40googlegroups.com?utm=
_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/scit=
e-interest/c128b3eb-3d35-4b85-93d3-e6fd9ee7a2f0n%40googlegroups.com</a>.<br=
/>
------=_Part_314437_102964274.1747004087056--
------=_Part_314436_326323403.1747004087056--