@@ -7,7 +7,7 @@ Add commands to the environment.
77** Type** :
88
99``` 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) )
1111```
1212
1313** Default value** :
@@ -37,15 +37,42 @@ list of (submodule)
3737
3838- [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
3939
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) `
4168
4269Used to bring in a specific package. This package will be added to the
4370environment.
4471
4572** Type** :
4673
4774``` console
48- null or (package or string convertible to it)
75+ null or (package or string convertible to it) or package
4976```
5077
5178** Default value** :
5683
5784** Declared in** :
5885
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 )
6087
61- ### ` commands.*.category `
88+ ### ` commands.*.category (flatOptions) `
6289
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.
6592
6693** Type** :
6794
@@ -77,9 +104,9 @@ string
77104
78105** Declared in** :
79106
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 )
81108
82- ### ` commands.*.command `
109+ ### ` commands.*.command (flatOptions) `
83110
84111If defined, it will add a script with the name of the command, and the
85112content of this value.
@@ -110,9 +137,33 @@ null
110137
111138** Declared in** :
112139
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) `
114143
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) `
116167
117168Describes what the command does in one line of text.
118169
@@ -130,11 +181,15 @@ null
130181
131182** Declared in** :
132183
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.
134189
135- ### ` commands.*.name `
190+ Defaults to a ` package (flatOptions) ` name or pname if present.
136191
137- Name of this command. Defaults to attribute name in commands .
192+ The value of this option is required for a ` command (flatOptions) ` .
138193
139194** Type** :
140195
@@ -150,7 +205,27 @@ null
150205
151206** Declared in** :
152207
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 )
154229
155230### ` devshell.packages `
156231
0 commit comments