@@ -7,7 +7,7 @@ Add commands to the environment.
7
7
** Type** :
8
8
9
9
``` console
10
- list of (submodule )
10
+ list of ((package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ]) or (flatOptions) )
11
11
```
12
12
13
13
** Default value** :
@@ -37,15 +37,42 @@ list of (submodule)
37
37
38
38
- [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
39
39
40
- ### ` commands.*.package `
40
+ ### ` commands.* `
41
+
42
+ A config for a command when the ` commands ` option is a list.
43
+
44
+ ** Type** :
45
+
46
+ ``` console
47
+ (package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ]) or (flatOptions)
48
+ ```
49
+
50
+ ** Example value** :
51
+
52
+ ``` nix
53
+ [
54
+ {
55
+ category = "scripts";
56
+ package = "black";
57
+ }
58
+ [ "[package] print hello" "hello" ]
59
+ "nodePackages.yarn"
60
+ ]
61
+ ```
62
+
63
+ ** Declared in** :
64
+
65
+ - [ nix/commands/types.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/types.nix )
66
+
67
+ ### ` commands.*.package (flatOptions) `
41
68
42
69
Used to bring in a specific package. This package will be added to the
43
70
environment.
44
71
45
72
** Type** :
46
73
47
74
``` console
48
- null or (package or string convertible to it)
75
+ null or (package or string convertible to it) or package
49
76
```
50
77
51
78
** Default value** :
56
83
57
84
** Declared in** :
58
85
59
- - [ modules /commands.nix] ( https://github.com/numtide/devshell/tree/main/modules /commands.nix )
86
+ - [ nix /commands/flatOptions .nix] ( https://github.com/numtide/devshell/tree/main/nix /commands/flatOptions .nix )
60
87
61
- ### ` commands.*.category `
88
+ ### ` commands.*.category (flatOptions) `
62
89
63
- Set a free text category under which this command is grouped
64
- and shown in the help menu.
90
+ Sets a free text category under which this command is grouped
91
+ and shown in the devshell menu.
65
92
66
93
** Type** :
67
94
@@ -77,9 +104,9 @@ string
77
104
78
105
** Declared in** :
79
106
80
- - [ modules /commands.nix] ( https://github.com/numtide/devshell/tree/main/modules /commands.nix )
107
+ - [ nix /commands/flatOptions .nix] ( https://github.com/numtide/devshell/tree/main/nix /commands/flatOptions .nix )
81
108
82
- ### ` commands.*.command `
109
+ ### ` commands.*.command (flatOptions) `
83
110
84
111
If defined, it will add a script with the name of the command, and the
85
112
content of this value.
@@ -110,9 +137,33 @@ null
110
137
111
138
** Declared in** :
112
139
113
- - [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
140
+ - [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
141
+
142
+ ### ` commands.*.expose (flatOptions) `
114
143
115
- ### ` commands.*.help `
144
+ When ` true ` , the ` command (flatOptions) `
145
+ or the ` package (flatOptions) ` will be added to the environment.
146
+
147
+ Otherwise, they will not be added to the environment, but will be printed
148
+ in the devshell menu.
149
+
150
+ ** Type** :
151
+
152
+ ``` console
153
+ boolean
154
+ ```
155
+
156
+ ** Default value** :
157
+
158
+ ``` nix
159
+ true
160
+ ```
161
+
162
+ ** Declared in** :
163
+
164
+ - [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
165
+
166
+ ### ` commands.*.help (flatOptions) `
116
167
117
168
Describes what the command does in one line of text.
118
169
@@ -130,11 +181,15 @@ null
130
181
131
182
** Declared in** :
132
183
133
- - [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
184
+ - [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
185
+
186
+ ### ` commands.*.name (flatOptions) `
187
+
188
+ Name of this command.
134
189
135
- ### ` commands.*.name `
190
+ Defaults to a ` package (flatOptions) ` name or pname if present.
136
191
137
- Name of this command. Defaults to attribute name in commands .
192
+ The value of this option is required for a ` command (flatOptions) ` .
138
193
139
194
** Type** :
140
195
@@ -150,7 +205,27 @@ null
150
205
151
206
** Declared in** :
152
207
153
- - [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
208
+ - [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
209
+
210
+ ### ` commands.*.prefix (flatOptions) `
211
+
212
+ Prefix of the command name in the devshell menu.
213
+
214
+ ** Type** :
215
+
216
+ ``` console
217
+ string
218
+ ```
219
+
220
+ ** Default value** :
221
+
222
+ ``` nix
223
+ ""
224
+ ```
225
+
226
+ ** Declared in** :
227
+
228
+ - [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
154
229
155
230
### ` devshell.packages `
156
231
0 commit comments