Skip to content

Commit

Permalink
Fix to complete filename for crystal tool subcommands (#5158)
Browse files Browse the repository at this point in the history
* Fix to complete filename for `crystal tool` subcommands

In `completion.zsh`, $programfile was missing for `crystal tool` subcommands.

* Fix `crystal spec` completion also
makenowjust authored and RX14 committed Oct 26, 2017
1 parent 844cc6e commit 54a7fc3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions etc/completion.zsh
Original file line number Diff line number Diff line change
@@ -147,6 +147,7 @@ _crystal-run() {

_crystal-spec() {
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \
@@ -185,6 +186,7 @@ _crystal-tool() {
case $line[1] in
(context)
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \
@@ -195,6 +197,7 @@ _crystal-tool() {

(expand)
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \
@@ -205,14 +208,16 @@ _crystal-tool() {

(format)
_arguments \
$help_args \
$no_color_args \
$format_args \
'(--check)--check[checks that formatting code produces no changes]'
$programfile \
$help_args \
$no_color_args \
$format_args \
'(--check)--check[checks that formatting code produces no changes]' \
;;

(hierarchy)
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \
@@ -223,6 +228,7 @@ _crystal-tool() {

(implementations)
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \
@@ -233,6 +239,7 @@ _crystal-tool() {

(types)
_arguments \
$programfile \
$help_args \
$no_color_args \
$exec_args \

0 comments on commit 54a7fc3

Please sign in to comment.