Note: MyBad, this problem applies to Fixes_3_0 but not RC1. It seems RC1 was forked before the commit that causes the problem. Strangely, Fixes_3_0 identifies itself, Help->AboutLazarus as 3.0RC1 too ??
Yes, the problem seem to have been introduced in idecmdline.pas where a new proc, ExpandCfgFileName has been introduced (#166) and called while cleaning up the parameters. Its not aware of how special *nix sees '~' apparently. I think its a mistake, not a deliberate change in behaviour, I'll put in a bug report and make a patch.
Davo
Edit : I think its as simple as deciding that a cmd line parameter (inc ones in cfg file) that start with a ~ should NOT be expanded. That way, the path is unchanged and eventually ends up in SetPrimaryConfigPath intact. But, I guess, maybe, Windows might not want that to happen ? I am assuming whoever wrote ExpandCfgFileName() was a windows programmer and he/she expected it to behave as it is doing right now. Tilde in path names, sigh, who would that thats a good idea ?
Edit 2 : Yep, just don't expand a parameter that contains a tilde works fine, still unsure if I need to exclude Windows from that test, might contact the author of the original change ...
if pos('~', S) < 1 then
ExpandCfgFilename(s);
or
{$ifndef WINDOWS} if pos('~', S) < 1 then {$endif}
ExpandCfgFilename(s);
Davo
Edit:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40363