Skip to content

Commit 93c6c55

Browse files
committed
update paths for nicrc
1 parent c6ecdf8 commit 93c6c55

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

docs/FAQ.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ export THEOS=/usr/local/theos
2020
If this is undesirable, you can tell NIC to revert to symlinking `theos`:
2121

2222
```console
23-
$ echo 'link_theos = "1"' >> ~/.nicrc
23+
$ echo 'link_theos = "1"' >> ~/.config/theos/nicrc
2424
```
2525

26-
See [here](/docs/NIC.html#nicrc) for more details on `.nicrc`.
26+
See [here](/docs/NIC.html#nicrc) for more details on `nicrc`.
2727

2828
## How do I use Swift in my projects?
2929
This information has moved to the [Swift](/docs/Swift.html) page.

docs/NIC-Syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Each NIC template <span class="required">requires</span> a control file. The con
4141
- <span class="optional">optional</span>
4242
- Prompts the user for additional information, which will be stored in *variable*.
4343
- Optionally supports the inclusion of a default value, which the user can accept by entering nothing.
44-
- The user is given a chance to override the prompt variable with their <code class="highlighter-rouge">~/.nicrc</code>.
44+
- The user is given a chance to override the prompt variable with their <code class="highlighter-rouge">nicrc</code>.
4545

4646
<code class="highlighter-rouge"><strong>constrain</strong> "<span class="required">path</span>" to <span class="required">constraint</span></code>
4747

@@ -62,7 +62,7 @@ Each NIC template <span class="required">requires</span> a control file. The con
6262
- The NIC templates that ship with Theos use the `package` constraint to avoid creating unnecessary `control` files.
6363

6464
`link_theos`
65-
- Used in some templates to include an optional link to theos. Set/overridden by `link_theos` in the user's `~/.nicrc`.
65+
- Used in some templates to include an optional link to theos. Set/overridden by `link_theos` in the user's `nicrc`.
6666
- The NIC templates that ship with Theos use this constraint to avoid creating unnecessary `theos/` symlinks.
6767

6868
### Example <code class="highlighter-rouge">NIC/control</code>
@@ -130,7 +130,7 @@ The `NIC` object represents the current template.
130130
- Prompt the user for additional information, attaching the user's response to the provided NIC variable.
131131
- The default value is optional.
132132
- If *$variable* is not specified, `NIC->prompt(...)` will return the user's response, and will not store it in the template.
133-
- The key difference between `prompt(...)` and `NIC->prompt(...)` is that the user is given a chance to override the prompt variable with their `~/.nicrc`.
133+
- The key difference between `prompt(...)` and `NIC->prompt(...)` is that the user is given a chance to override the prompt variable with their `nicrc`.
134134

135135
- <code class="highlighter-rouge">NIC->setConstraint(<span class="required">$constraint</span>)</code>
136136

docs/NIC.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,13 @@ The templates included in this legacy templates module:
9797
* **notification_center_widget-7up**: an iOS 7 – 9 Notification Center Today widget.
9898
* **xpc_service**: a C-based [XPC](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html) service.
9999

100-
## .nicrc
101-
NIC reads configuration data from `~/.nicrc`. This file uses a simple key-value format, `key = "value"`. Values must be enclosed in quotes, even if it is a number.
100+
## nicrc
101+
NIC configuration data can be stored in a config file to pre-fill values for templates. A simple key-value format is used: `key = "value"`. Values must be enclosed in quotes, even if it is a number.
102+
103+
The first matching file is sourced:
104+
1. `$(XDG_CONFIG_HOME)/theos/nicrc`
105+
2. `$(HOME)/.config/theos/nicrc`
106+
3. `$(HOME)/.nicrc`
102107

103108
### Instance Metadata
104109
* **`package_prefix`** *string*. The prefix to use by default for reverse DNS package identifiers. The default is `com.yourcompany`. For example, setting `package_prefix = "ws.hbang"` and creating a new project called "Example Instance" will make the default package identifier `ws.hbang.exampleinstance`.

0 commit comments

Comments
 (0)