mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
lib/options: update showOption comment
This commit is contained in:
parent
ef0f472c01
commit
6c7d4d4f9d
|
@ -337,19 +337,17 @@ rec {
|
||||||
|
|
||||||
# Helper functions.
|
# Helper functions.
|
||||||
|
|
||||||
/* Convert an option, described as a list of the option parts in to a
|
/* Convert an option, described as a list of the option parts to a
|
||||||
safe, human readable version.
|
human-readable version.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
(showOption ["foo" "bar" "baz"]) == "foo.bar.baz"
|
(showOption ["foo" "bar" "baz"]) == "foo.bar.baz"
|
||||||
(showOption ["foo" "bar.baz" "tux"]) == "foo.bar.baz.tux"
|
(showOption ["foo" "bar.baz" "tux"]) == "foo.\"bar.baz\".tux"
|
||||||
|
(showOption ["windowManager" "2bwm" "enable"]) == "windowManager.\"2bwm\".enable"
|
||||||
|
|
||||||
Placeholders will not be quoted as they are not actual values:
|
Placeholders will not be quoted as they are not actual values:
|
||||||
(showOption ["foo" "*" "bar"]) == "foo.*.bar"
|
(showOption ["foo" "*" "bar"]) == "foo.*.bar"
|
||||||
(showOption ["foo" "<name>" "bar"]) == "foo.<name>.bar"
|
(showOption ["foo" "<name>" "bar"]) == "foo.<name>.bar"
|
||||||
|
|
||||||
Unlike attributes, options can also start with numbers:
|
|
||||||
(showOption ["windowManager" "2bwm" "enable"]) == "windowManager.2bwm.enable"
|
|
||||||
*/
|
*/
|
||||||
showOption = parts: let
|
showOption = parts: let
|
||||||
escapeOptionPart = part:
|
escapeOptionPart = part:
|
||||||
|
|
Loading…
Reference in a new issue