File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,13 @@ nr -C playground dev
176
176
177
177
### Config
178
178
179
+ ``` bash
180
+ # ~/.bashrc
181
+
182
+ # custom configuration file path
183
+ export NI_CONFIG_FILE=" $HOME /.config/ni/nirc"
184
+ ```
185
+
179
186
``` ini
180
187
; ~/.nirc
181
188
Original file line number Diff line number Diff line change @@ -3,11 +3,15 @@ import path from 'path'
3
3
import ini from 'ini'
4
4
import { Agent } from './agents'
5
5
6
+ const customRcPath = process . env . NI_CONFIG_FILE
7
+
6
8
const home = process . platform === 'win32'
7
9
? process . env . USERPROFILE
8
10
: process . env . HOME
9
11
10
- const rcPath = path . join ( home || '~/' , '.nirc' )
12
+ const defaultRcPath = path . join ( home || '~/' , '.nirc' )
13
+
14
+ const rcPath = customRcPath || defaultRcPath
11
15
12
16
interface Config {
13
17
defaultAgent : Agent | 'prompt'
You can’t perform that action at this time.
0 commit comments