commercialhaskell / commercialhaskell/stack

Stack bash completion is incomplete

Open
#2,737 1 comment 0 reactions 0 assignees View on GitHub
component: options parsing type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

This is getting really nitpicky, but here we go:
### General summary/comments (optional)

Bash completion for `stack build` does not include `--bench` (among other things).
### Steps to reproduce

```
$ eval "$(stack --bash-completion-script "$which stack")"
$ stack build --b[[TAB]]
```
### Expected

It should expand to `--bench` as the common partial completion, and suggest further possible completions. Similar to how it does this:

``` bash
$ stack build --no-r[[TAB]]
# expands to
$ stack build --no-run-
# press tab again, and it suggests
--no-run-benchmarks --no-run-tests
```
### Actual

It expands to

``` bash
$ stack build --benchmark-arguments
```

Which means the completions aren't aware of `--bench` as an option here.
### Stack version

```
$ stack --version
Version 1.2.0 x86_64 hpack-0.14.0
```
### Method of installation
- Official binary, downloaded from stackage.org or fpcomplete's package repository
- and then several `stack upgrade`s

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.