Configuration - nu-dev/nu GitHub Wiki
nu configuration
there are 3 configuration levels in nu:
- across a nu directory (defined in top level directory in the file
nu.kg
) - across a template (defined in the template directory in the file
template.kg
) - across a page (automatically generated)
the two editable configuration levels use a custom file format named kagyari
.
here's a quick rundown:
kagyari is a simple configuration style that uses #
for comments, and =
to assign values.
values are always strings.
there are two ways to set a value:
- using
"
: typical usage similar to many other configuration file formats. technically, you can have multi-line quotes if you want to, but the recommended usage is with the second form if you want multi-line. ie,name = "mason"
- using
<<<
(heredoc-similar): put exactly 3<
, followed by 3 non-null and not newline characters of your choice. (no spaces in between). afterwards, put however much text you want, and the configuration parser will read everything until the same 3 characters are present again.
please note that kagyari does not escape anything in double quotes. if you want to type the "
character in a string, you will have to use the heredoc-similar method.
here's a sample of kagyari configuration that may help you understand:
#kagyari test
# my favcolor=pink, but yours can change here
favcolor = "red" #i changed my mind ;)
name= "bob" # notice how the spaces around the = are allowed
about = <<<END
Hi there! My name is Bob.
# work in here
I like cheeseburgers.
My favorite quote is: "I said that?!?"END