From b152a4901fc1314ef24ba5bc2ad1f6f5e824f9e7 Mon Sep 17 00:00:00 2001 From: Alex Vondrak Date: Tue, 16 Mar 2021 13:44:40 -0700 Subject: [PATCH] Autocomplete files for mix run Previously, `mix run ` would not expand into anything, even though the [`mix run`](https://hexdocs.pm/mix/Mix.Tasks.Run.html) task accepts filenames as inputs. This commit collapses the growing list of such cases (`test`, `format`, `run`) into one clause that autocompletes files. Although `mix run` accepts several different `--flags`, the autocompletion isn't currently set up to deal with subcommands' specific options, so I'm punting on that part. --- src/_mix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/_mix b/src/_mix index c92432c..989adef 100644 --- a/src/_mix +++ b/src/_mix @@ -227,11 +227,7 @@ case $state in _arguments ':feature:__task_list' return ;; - (test) - _arguments ':PATH:_files' - return - ;; - (format) + (test|format|run) _arguments ':PATH:_files' return ;;