pashi
pashi copied to clipboard
Add `-` parameter to `--title` command to restore default title
To specify a document title the --title command is used, but to restore the default title the title-default command is required.
It would simplify things if --title - could be used instead of title-default to restore the default title.
title-default could then be deprecated.
In the case statement of
https://github.com/delphidabbler/pashi/blob/787c0ba79e252ae730bb3477967e2c9ba007c80d/Src/UParams.pas#L666
Modify the code for --title & --title-default as follows:
siTitle:
begin
var Param := GetStringParameter(Command);
if Param = '-' then
fConfig.Title := ''
else
fConfig.Title := Param;
fParamQueue.Dequeue;
end;
siTitleDefault:
begin
fWarnings.Add(
Format(sDeprecatedCmd, [AdjustCommandName(Command.Name, IsConfigCmd)])
);
// modify above warning to say to use `--title -`?
fConfig.Title := '';
end;
Implemented title - / -t - and deprecated --title-default at commit 26cd604