Skip to content

Commit 54a7fc3

Browse files
makenowjustRX14
authored andcommittedOct 26, 2017
Fix to complete filename for crystal tool subcommands (#5158)
* Fix to complete filename for `crystal tool` subcommands In `completion.zsh`, $programfile was missing for `crystal tool` subcommands. * Fix `crystal spec` completion also
1 parent 844cc6e commit 54a7fc3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
 

‎etc/completion.zsh

+11-4
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ _crystal-run() {
147147

148148
_crystal-spec() {
149149
_arguments \
150+
$programfile \
150151
$help_args \
151152
$no_color_args \
152153
$exec_args \
@@ -185,6 +186,7 @@ _crystal-tool() {
185186
case $line[1] in
186187
(context)
187188
_arguments \
189+
$programfile \
188190
$help_args \
189191
$no_color_args \
190192
$exec_args \
@@ -195,6 +197,7 @@ _crystal-tool() {
195197

196198
(expand)
197199
_arguments \
200+
$programfile \
198201
$help_args \
199202
$no_color_args \
200203
$exec_args \
@@ -205,14 +208,16 @@ _crystal-tool() {
205208

206209
(format)
207210
_arguments \
208-
$help_args \
209-
$no_color_args \
210-
$format_args \
211-
'(--check)--check[checks that formatting code produces no changes]'
211+
$programfile \
212+
$help_args \
213+
$no_color_args \
214+
$format_args \
215+
'(--check)--check[checks that formatting code produces no changes]' \
212216
;;
213217

214218
(hierarchy)
215219
_arguments \
220+
$programfile \
216221
$help_args \
217222
$no_color_args \
218223
$exec_args \
@@ -223,6 +228,7 @@ _crystal-tool() {
223228

224229
(implementations)
225230
_arguments \
231+
$programfile \
226232
$help_args \
227233
$no_color_args \
228234
$exec_args \
@@ -233,6 +239,7 @@ _crystal-tool() {
233239

234240
(types)
235241
_arguments \
242+
$programfile \
236243
$help_args \
237244
$no_color_args \
238245
$exec_args \

0 commit comments

Comments
 (0)