i3 / i3/i3status

Misleading error message from config parser

Open
#249 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
653
Forks
254
PR merge metrics
No merged PRs in 30d

Description

Given this (erroneous) configuration
```
general {
output_format = "dzen2"
colors = true
interval = 5
}

order += "disk /home
order += "wireless wlan0"
order += "volume master"

wireless wlan0 {
format_up = "W: (%quality at %essid, %bitrate) %ip"
format_down = "W: down"
}

disk "/home" {
format = "%free"
}

volume master {
format = "♪: %volume"
format_muted = "♪: muted (%volume)"
device = "default"
mixer = "Master"
mixer_idx = 0
}
```
`i3status` reports:
```
bla.cfg:9: missing opening brace for section 'wireless'
```

While it's obvious how the parse reaches this conclusion, it's not all that helpful when searching for the actual mistake. Unfortunately, I'm not familiar with the parser code and have no time right now to look at it.

Maybe allowing new blocks to only start at the beginning of a line could improve this. While something like
```
order += "volume master" wireless wlan0 {
format_up = "W: (%quality at %essid, %bitrate) %ip"
format_down = "W: down"
}
```
seems to work just fine I doubt this is really needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.