Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify documentation for enable pseudo-variable #5659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gridbugs
Copy link
Contributor

The documentation for variables says that for boolean variables the form name1+name2+name3:var is equivalent to
name1:var & name2:var & name3:var but it's possible to write name1+name2:enable despite enable being the string "enable" or "disable". This change clarifies that enable isn't really a variable but syntactic sugar instead.

doc/pages/Manual.md Outdated Show resolved Hide resolved
The documentation for variables says that for boolean variables the form
`name1+name2+name3:var` is equivalent to
`name1:var & name2:var & name3:var` but it's possible to write
`name1+name2:enable` despite `enable` being the string "enable" or
"disable". This change clarifies that `enable` isn't really a variable
but syntactic sugar instead.
Comment on lines +495 to +499
- <a id="pkgvar-enable">`enable`</a>: is not a variable.
`pkg1+pkg2+...+pkgN:enable` is syntactic sugar for
`pkg1+pkg2+...+pkgN:installed?enable:disable`. That is, it behaves like a
variable that takes the value "enable" or "disable" depending on whether the
package(s) are installed
Copy link
Collaborator

@rjbou rjbou Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- <a id="pkgvar-enable">`enable`</a>: is not a variable.
`pkg1+pkg2+...+pkgN:enable` is syntactic sugar for
`pkg1+pkg2+...+pkgN:installed?enable:disable`. That is, it behaves like a
variable that takes the value "enable" or "disable" depending on whether the
package(s) are installed
- <a id="pkgvar-enable">`enable`</a>:
takes the value "enable" or "disable" depending on whether the package is
installed. Used with the combination operator `+`,
`name1+name2+name3:enable` is syntactic sugar for
`name1+name2+name3:installed?enable:disable`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Used with combination operator `+`,
+ Used with the combination operator `+`,

@rjbou
Copy link
Collaborator

rjbou commented Sep 11, 2023

test in #5642 updated

Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed a rewording. The combination part is a specific note on enabled variable usage with combination; It should be put after the definition.

@kit-ty-kate kit-ty-kate removed this from the 2.2.0~alpha3 milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants