0

I'm learning Prolog at University and have a lot of *.pl files. I already managed to make gedit recognize them as Prolog files and not Perl Scripts for syntax highlighting following this question and changing both prolog.lang and perl.lang in /usr/share/gtksourceview-4/language-specs:

However I'd like my filemanager to recognice this too, so when I take a look at the details it sais something like Type: Prolog instead of Type: Perl Script.
I'm currently using Manjaro 20.0.3 with the Gnome desktop and Nautilus file manager. I'd be happy about a custom solution for this setup but even more about a general approach for linux.

1 Answer 1

0

This was in covered in another group, where the conflict comes from people who have given recognition precedence for '.pl' as Perl, even though '.pl' was associated with Prolog at least 1 decade earlier.

Since Prolog did not get the traction in terms of extent of lines coded with it, compared to those for Perl, System programmers have defined configuration files for Perl recognition (the majority winner by visibility/presence), and omitted those for Prolog because of its low prevalence in the mind-space of the world at large.

In general, I found that I had to code recognition of the beginning of the first line in order to get proper recognition, using either the 'file' command or custom scripts/logic, even when I make no use of Perl. I am currently trying to get into Prolog, so when I have finalized my approach, I will post back with a modification to this.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.