20
850
Fork
You've already forked fuzzel
83

Accept ; comments in the INI config (or change extension to .conf) #744

Open
opened 2026年03月10日 23:05:16 +01:00 by plip · 5 comments

Fuzzel Version

fuzzel version: 1.14.1 +cairo +png +svg(resvg) -assertions

Compositor Version

niri 25.11

Distribution

arch

Fuzzel config

; hello
horizontal-pad=40

Description of Bug and Steps to Reproduce

Hi and first of all, thanks for a useful app which I enjoy using.

I just wanted to report/ask about a gotcha.

Lets get straight to the point, laying out my reasoning below:

Given the .ini suffix of the config file ~/.config/fuzzel/fuzzel.ini, I am assuming it's an INI file and proceed to use ; as a comment.

Turns out this results in the following error:

Mar 10 22:57:25 fuzzel[2082775]: config: /home/w/.config/fuzzel/fuzzel.ini:1: [main].; hello: syntax error: key/value pair has no value

So my question is: Why use an INI-like config format if it doesnt adhere to the INI conventions, like ; being a comment?

(I do realize you use # as a comment marker, but that's not compatible with INI files to my understanding.)

Here's an example INI from wikipedia:

; last modified 1 April 2001 by John Doe
[owner]
name = John Doe
organization = Acme Widgets Inc.
[database]
; use IP address in case network name resolution is not working
server = 192.0.2.62 
port = 143
file = "payroll.dat"

This is a format I grew up with and have been familiar with for ~30 years now, so this is sort of confusing to me :-)

Relevant logs, stacktraces, etc.

No response

### Fuzzel Version fuzzel version: 1.14.1 +cairo +png +svg(resvg) -assertions ### Compositor Version niri 25.11 ### Distribution arch ### Fuzzel config ```ini ; hello horizontal-pad=40 ``` ### Description of Bug and Steps to Reproduce Hi and first of all, thanks for a useful app which I enjoy using. I just wanted to report/ask about a gotcha. Lets get straight to the point, laying out my reasoning below: Given the .ini suffix of the config file ~/.config/fuzzel/fuzzel.ini, I am assuming it's an [INI file](https://en.wikipedia.org/wiki/INI_file#Example) and proceed to use ; as a comment. Turns out this results in the following error: Mar 10 22:57:25 fuzzel[2082775]: config: /home/w/.config/fuzzel/fuzzel.ini:1: [main].; hello: syntax error: key/value pair has no value So my question is: Why use an INI-like config format if it doesnt adhere to the INI conventions, like ; being a comment? (I do realize you use # as a comment marker, but that's not compatible with INI files to my understanding.) Here's an example INI from wikipedia: ```ini ; last modified 1 April 2001 by John Doe [owner] name = John Doe organization = Acme Widgets Inc. [database] ; use IP address in case network name resolution is not working server = 192.0.2.62 port = 143 file = "payroll.dat" ``` This is a format I grew up with and have been familiar with for ~30 years now, so this is sort of confusing to me :-) ### Relevant logs, stacktraces, etc. _No response_
Collaborator
Copy link

Although INI is not a standardized format, popular parsers to seem to all support the ;. With the .ini extension, it's reasonable to assume that Fuzzel would, too. The man fuzzel.ini docs could be clearer on this point as well. It does not seem to document what the comment character is, only describing the format as the "standard unix configuration format". I'm sure I'd say there's a standard Unix config file format, but there are still a lot of config files under /etc/ that use simple key=value format with # as the comment.

Against adding this: Fuzzel has been around for seven years and this is the first report I can recall of someone being confused about this. Probably a lot of people start with the default config file and modify it, or start with some example and follow the example. Also, # is definitely far more common a comment delimiter in Unix config files.

So, I'm on the fence about this. At a minimum, the docs could be improved to clarify more comments in the file.

One of the Unix philosophies is to "be liberal in what you accept, strict in what you produce". Following that, it's reasonable to support ; in a .ini file.

But given the general lack of interest, I'm also inclined to keep the software a bit simpler. To that end, we can leave this open and see if anyone else comes along to express interest.

Although INI is not a standardized format, popular parsers to seem to all support the `;`. With the `.ini` extension, it's reasonable to assume that Fuzzel would, too. The `man fuzzel.ini` docs could be clearer on this point as well. It does not seem to document what the comment character is, only describing the format as the "standard unix configuration format". I'm sure I'd say there's a standard Unix config file format, but there are still a lot of config files under `/etc/` that use simple key=value format with `#` as the comment. Against adding this: Fuzzel has been around for seven years and this is the first report I can recall of someone being confused about this. Probably a lot of people start with the default config file and modify it, or start with some example and follow the example. Also, `#` is definitely far more common a comment delimiter in Unix config files. So, I'm on the fence about this. At a minimum, the docs could be improved to clarify more comments in the file. One of the Unix philosophies is to "be liberal in what you accept, strict in what you produce". Following that, it's reasonable to support `;` in a `.ini` file. But given the general lack of interest, I'm also inclined to keep the software a bit simpler. To that end, we can leave this open and see if anyone else comes along to express interest.
Author
Copy link

I'm sure I'd say there's a standard Unix config file format, but there are still a lot of config files under /etc/ that use simple key=value format with # as the comment.

I agree here and I am familiar with other unix config files.

What tripped me this time was the .ini extension actually.

Compare to say a systemd config, which use kinda the same format, with # comments and all that. They dont use a .ini extension specifically.

I interpreted the extension to hold a meaning, hence I assumed it was the conventional INI as used on windows for decades now, with the ; used for comments.

And I understand it's a disruptive suggestion, but maybe a better solution would be to abandon the .ini extension then.

FWIW, here's what systemd says about their configuration format:

The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files.

Each file is a plain text file divided into sections, with configuration entries in the style key=value. Whitespace immediately before or after the "=" is ignored. Empty lines and lines starting with "#" or ";" are ignored, which may be used for commenting.

> I'm sure I'd say there's a standard Unix config file format, but there are still a lot of config files under /etc/ that use simple key=value format with # as the comment. I agree here and I am familiar with other unix config files. What tripped me this time was the .ini extension actually. Compare to say a systemd config, which use kinda the same format, with # comments and all that. They dont use a .ini extension specifically. I interpreted the extension to hold a meaning, hence I assumed it was the conventional INI as used on windows for decades now, with the ; used for comments. And I understand it's a disruptive suggestion, but maybe a better solution would be to abandon the .ini extension then. FWIW, here's what systemd says about their configuration format: > The syntax is inspired by XDG Desktop Entry Specification .desktop files, which are in turn inspired by Microsoft Windows .ini files. > Each file is a plain text file divided into sections, with configuration entries in the style key=value. Whitespace immediately before or after the "=" is ignored. Empty lines and lines starting with "#" or ";" are ignored, which may be used for commenting.

For what it's worth, I too ran into that "issue". It's fairly trivially understood and resolved, which is why I suppose people haven't been reporting it here, but it still is somewhat pesky.

For instance, Vim's built-in comment package will add ; when working with the .ini files.
Reproduction steps:

docker run --rm -it archlinux sh
pacman -Sy --noconfirm vim
vim +'packadd comment' fuzzel.ini

Then just start typing some stuff and toggle the "comment" with gcc in normal mode; it'll use ;.

For what it's worth, I too ran into that "issue". It's fairly trivially understood and resolved, which is why I suppose people haven't been reporting it here, but it still is somewhat pesky. For instance, Vim's built-in `comment` package will add `;` when working with the `.ini` files. Reproduction steps: ```sh docker run --rm -it archlinux sh pacman -Sy --noconfirm vim vim +'packadd comment' fuzzel.ini ``` Then just start typing some stuff and toggle the "comment" with `gcc` in normal mode; it'll use `;`.
Collaborator
Copy link

I agree the current state isn't ideal, but I don't love the options:

  1. Do nothing. Confusion about why semicolons don't work as coments in INI file
  2. Move canonical extension from ".ini" to ".conf". Confusion about references to different extensions.
  3. Support both # and ; as comment delimiters in INI files. Confusion about seeing both types of comments in the wild.

Given no perfect resolution, there's some appeal to doing nothing. But that's the worst option because over time, nothing will improve. If we support ; as a comment character, because it is the standard commit character for INI files, over time we may see more even split of comment styles, so confusion could get worse there.

So I think changing the canonical extension to ".conf" is the best option, aligning with other software that uses INI-like formats but with # for comments. Over time ".ini" will become less popular, we could issue warnings to rename the file, or move it for people and eventually drop support for it and end up in a clean, consistent state eventually.

This proposal needs input from @dnkl

I agree the current state isn't ideal, but I don't love the options: 0. Do nothing. Confusion about why semicolons don't work as coments in INI file 1. Move canonical extension from ".ini" to ".conf". Confusion about references to different extensions. 2. Support both # and ; as comment delimiters in INI files. Confusion about seeing both types of comments in the wild. Given no perfect resolution, there's some appeal to doing nothing. But that's the worst option because over time, nothing will improve. If we support ; as a comment character, because it is the standard commit character for INI files, over time we may see more even split of comment styles, so confusion could get worse there. So I think changing the canonical extension to ".conf" is the best option, aligning with other software that uses INI-like formats but with # for comments. Over time ".ini" will become less popular, we could issue warnings to rename the file, or move it for people and eventually drop support for it and end up in a clean, consistent state eventually. This proposal needs input from @dnkl
markstos changed title from (削除) Accept ; comments in the INI config (削除ここまで) to Accept ; comments in the INI config (or change extension to .conf) 2026年03月23日 20:03:10 +01:00
Author
Copy link
  1. Support both # and ; as comment delimiters in INI files. Confusion about seeing both types of comments in the wild.

@markstos this is the path systemd has taken. One could analyze their situation to try to conclude if your fears have any merit.

> 2. Support both # and ; as comment delimiters in INI files. Confusion about seeing both types of comments in the wild. @markstos this is the path systemd has taken. One could analyze their situation to try to conclude if your fears have any merit.
Sign in to join this conversation.
No Branch/Tag specified
master
gnome-support
releases/1.14
issue-319-window-switching
issue-561-nord-theme-only
resvg-filtering-take-2
resvg-filtering
releases/1.13
rehanzo-dont-ignore-execute-648
keybinds-overwrite
issue-561-refresh-theme
ci-automated-testing
reenable-legacy-icons
releases/1.12
test-coverage-for-fzf-caching
releases/1.11
releases/1.10
releases/1.9
releases/1.8
releases/1.7
releases/1.6
releases/1.5
releases/1.4
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.14.1
1.14.0
1.13.1
1.13.0
1.12.0
1.11.1
1.11.0
1.10.2
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.2
1.8.1
1.8.0
1.7.0
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
0.9.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fuzzel#744
Reference in a new issue
dnkl/fuzzel
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?