[fpc-pascal] Search path order for fpc.cfg

Michael Van Canneyt michael at freepascal.org
Sun Apr 12 12:28:38 CEST 2020

On Sun, 12 Apr 2020, Sven Barth via fpc-pascal wrote:

>>> Why does fpc look for .fpc.cfg in the user home dir when it is
>>> otherwise looking for fpc.cfg?
>> Because the naming convention on unixes is like that for config files in
>> your home directory. This is not fpc specific.
>> This convention predates the systems used by desktop environments which
>> nowadays puts
>> everything in ~/.config or ~/.share or some other convention. But it is
>> still in use today.
> Just for completeness sake: this is not a convention for configuration
> files, but for *hidden* files in general. While in the global configuration
> directory (/etc) all files are (normally) visible for everyone the idea is
> that inside the user's home directory in most cases the user is only
> interested in the normal files of themselves when doing a "ls". Hidden
> files and directories are only shown with "ls -a". That is why FPC's
> configuration file is hidden: its good tone to hide configuration files in
> the user's home directory.

Exactly. That is also why the config directory is called .config or .share.
it is then 'hidden' by default.

Thank you for completing my explanation.


More information about the fpc-pascal mailing list