@@ -61,7 +61,7 @@ Add commands to the environment.
61
61
```
62
62
63
63
64
- ** Type** : list of (submodule )
64
+ ** Type** : list of ((package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ] ) or (flatOptions) )
65
65
66
66
** Example value** :
67
67
``` nix
@@ -72,7 +72,23 @@ Add commands to the environment.
72
72
Declared in:
73
73
* [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
74
74
75
- ## ` commands.*.package `
75
+ ## ` commands.* `
76
+
77
+ A config for a command when the ` commands ` option is a list.
78
+
79
+
80
+ ** Type** : (package or string convertible to it) or (list with two elements of types: [ string (package or string convertible to it) ] ) or (flatOptions)
81
+
82
+ ** Example value** :
83
+ ``` nix
84
+ {"_type":"literalExpression","text":"[\n {\n category = \"scripts\";\n package = \"black\";\n }\n [ \"[package] print hello\" \"hello\" ]\n \"nodePackages.yarn\"\n]\n"}
85
+ ```
86
+
87
+
88
+ Declared in:
89
+ * [ nix/commands/types.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/types.nix )
90
+
91
+ ## ` commands.*.package (flatOptions) `
76
92
77
93
Used to bring in a specific package. This package will be added to the
78
94
environment.
@@ -84,15 +100,15 @@ environment.
84
100
```
85
101
86
102
87
- ** Type** : null or (package or string convertible to it)
103
+ ** Type** : null or (package or string convertible to it) or package
88
104
89
105
Declared in:
90
- * [ modules /commands.nix] ( https://github.com/numtide/devshell/tree/main/modules /commands.nix )
106
+ * [ nix /commands/flatOptions .nix] ( https://github.com/numtide/devshell/tree/main/nix /commands/flatOptions .nix )
91
107
92
- ## ` commands.*.category `
108
+ ## ` commands.*.category (flatOptions) `
93
109
94
- Set a free text category under which this command is grouped
95
- and shown in the help menu.
110
+ Sets a free text category under which this command is grouped
111
+ and shown in the devshell menu.
96
112
97
113
98
114
** Default value** :
@@ -104,9 +120,9 @@ and shown in the help menu.
104
120
** Type** : string
105
121
106
122
Declared in:
107
- * [ modules /commands.nix] ( https://github.com/numtide/devshell/tree/main/modules /commands.nix )
123
+ * [ nix /commands/flatOptions .nix] ( https://github.com/numtide/devshell/tree/main/nix /commands/flatOptions .nix )
108
124
109
- ## ` commands.*.command `
125
+ ## ` commands.*.command (flatOptions) `
110
126
111
127
If defined, it will add a script with the name of the command, and the
112
128
content of this value.
@@ -130,9 +146,29 @@ provided.
130
146
131
147
132
148
Declared in:
133
- * [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
149
+ * [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
150
+
151
+ ## ` commands.*.expose (flatOptions) `
152
+
153
+ When ` true ` , the ` command (flatOptions) `
154
+ or the ` package (flatOptions) ` will be added to the environment.
155
+
156
+ Otherwise, they will not be added to the environment, but will be printed
157
+ in the devshell menu.
158
+
159
+
160
+ ** Default value** :
161
+ ``` nix
162
+ {"_type":"literalExpression","text":"true"}
163
+ ```
134
164
135
- ## ` commands.*.help `
165
+
166
+ ** Type** : boolean
167
+
168
+ Declared in:
169
+ * [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
170
+
171
+ ## ` commands.*.help (flatOptions) `
136
172
137
173
Describes what the command does in one line of text.
138
174
@@ -146,11 +182,15 @@ Describes what the command does in one line of text.
146
182
** Type** : null or string
147
183
148
184
Declared in:
149
- * [ modules /commands.nix] ( https://github.com/numtide/devshell/tree/main/modules /commands.nix )
185
+ * [ nix /commands/flatOptions .nix] ( https://github.com/numtide/devshell/tree/main/nix /commands/flatOptions .nix )
150
186
151
- ## ` commands.*.name `
187
+ ## ` commands.*.name (flatOptions) `
152
188
153
- Name of this command. Defaults to attribute name in commands.
189
+ Name of this command.
190
+
191
+ Defaults to a ` package (flatOptions) ` name or pname if present.
192
+
193
+ The value of this option is required for a ` command (flatOptions) ` .
154
194
155
195
156
196
** Default value** :
@@ -162,7 +202,23 @@ Name of this command. Defaults to attribute name in commands.
162
202
** Type** : null or string
163
203
164
204
Declared in:
165
- * [ modules/commands.nix] ( https://github.com/numtide/devshell/tree/main/modules/commands.nix )
205
+ * [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
206
+
207
+ ## ` commands.*.prefix (flatOptions) `
208
+
209
+ Prefix of the command name in the devshell menu.
210
+
211
+
212
+ ** Default value** :
213
+ ``` nix
214
+ {"_type":"literalExpression","text":"\"\""}
215
+ ```
216
+
217
+
218
+ ** Type** : string
219
+
220
+ Declared in:
221
+ * [ nix/commands/flatOptions.nix] ( https://github.com/numtide/devshell/tree/main/nix/commands/flatOptions.nix )
166
222
167
223
## ` devshell.packages `
168
224
0 commit comments