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

Sven Barth pascaldragon at googlemail.com
Sun Apr 12 12:24:18 CEST 2020


Michael Van Canneyt <michael at freepascal.org> schrieb am So., 12. Apr. 2020,
12:16:

>
>
> On Sun, 12 Apr 2020, Bo Berglund via fpc-pascal wrote:
>
> > On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal
> > <fpc-pascal at lists.freepascal.org> wrote:
> >
> >> 2)    Your home directory, it looks for .fpc.cfg.
> >
> > This is something I have been wondering about for a while..
> > When I install FPC from sources I have to create a config file by
> > using this command:
> >
> > /home/user/lib/fpc/$FPCVER/samplecfg "/home/user/lib/fpc/$FPCVER"
> > "/home/user"
> > (replace "user" with the actual username such as pi or whatever)
> >
> > The problem with this is that the generated file is named fpc.cfg so I
> > have to do a rename afterwards and this is not always remembered (like
> > yesterday).
>
> You can hardly blame us for you not remembering things... :-)
>
> > 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.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20200412/815f5d62/attachment.html>


More information about the fpc-pascal mailing list