mirror of https://gitlab.com/basile.b/dexed.git
custom tools, allow to interpolate the parameters with the result of the input query, close #53
This commit is contained in:
parent
d2bbe29e88
commit
cc4fdbfc40
|
@ -193,6 +193,7 @@ end;
|
|||
|
||||
procedure TCEToolItem.execute(previous: TCEToolItem);
|
||||
var
|
||||
arg: string;
|
||||
prm: string;
|
||||
inp: string;
|
||||
old: string;
|
||||
|
@ -220,7 +221,14 @@ begin
|
|||
begin
|
||||
prm := '';
|
||||
if InputQuery('Parameters', '', prm) then
|
||||
if prm.isNotEmpty then fProcess.Parameters.AddText(fSymStringExpander.expand(prm));
|
||||
begin
|
||||
prm := fSymStringExpander.expand(prm);
|
||||
arg := StringReplace(fParameters.Text, '<$1>', prm, [rfReplaceAll]);
|
||||
if prm.isNotEmpty and (arg = fParameters.Text) then
|
||||
fProcess.Parameters.AddText(prm)
|
||||
else
|
||||
fProcess.Parameters.Text := arg;
|
||||
end;
|
||||
end;
|
||||
ensureNoPipeIfWait(fProcess);
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue