Skip to content

Mark .desktop files as ini#105371

Closed
remcohaszing wants to merge 1 commit intomicrosoft:masterfrom
remcohaszing:ini-desktop-files
Closed

Mark .desktop files as ini#105371
remcohaszing wants to merge 1 commit intomicrosoft:masterfrom
remcohaszing:ini-desktop-files

Conversation

@remcohaszing
Copy link
Contributor

Linux desktop entries are ini files using the .desktop extension.

Linux desktop entries are ini files using the `.desktop` extension.
@Tyriar
Copy link
Member

Tyriar commented Aug 26, 2020

They're close, but I don't think they're the exact ini format, here's ours for example which has bad coloring under the ini language:

image

@Tyriar Tyriar assigned aeschli and unassigned Tyriar Aug 26, 2020
@remcohaszing
Copy link
Contributor Author

I think this is an issue with the ini language definition, not .desktop files. Inline comments shouldn’t be allowed.

E.g. from https://editorconfig.org/ (also in the extensions list):

EditorConfig files use an INI format that is compatible with the format used by Python ConfigParser Library, […truncated…] and octothorpes (#) or semicolons (;) are used for comments. Comments should go on their own lines.

>>> import configparser
>>> parser = configparser.ConfigParser()
>>> parser.read_string("""
... [foo]
... bar = baz; fooz
... """)
>>> parser.get('foo', 'bar')
'baz; fooz'
>>>

Another source: https://en.wikipedia.org/wiki/INI_file#Comments

I don’t think there’s an official standard for the ini format.

@aeschli
Copy link
Contributor

aeschli commented Aug 27, 2020

Given the slight differences I would not add the association. The comment highlighting is quite useful and we don't want to remove it. But it will confuse users that open a .desktop file.

Sorry for that...

@aeschli aeschli closed this Aug 27, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2020
@remcohaszing remcohaszing deleted the ini-desktop-files branch August 5, 2022 10:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants