can't tab-complete to get filenames running `stack exec` for tools #832

Open
wolftune opened this Issue Aug 23, 2015 · 2 comments

Projects

None yet

2 participants

@wolftune
Contributor

For example, if I use stack to install hlint, as in stack build hlint, then I must use stack to run it, and can't just do hlint on its own. It would be ideal to not always need stack exec hlint, but even if we accept that longer command, I can't tab-complete to get filenames then. So, this is far less ideal than pre-stack situation (but I want to stick to Stack generally, not go back to cabal install or system-level stuff for tools like this).

@borsboom borsboom added this to the Later improvements milestone Aug 23, 2015
@borsboom
Contributor

You should be able to run stack install hlint, which will put hlint in ~/.local/bin (which you should add to your PATH). Then you can just use hlint normally, and this is the preferred way to set up such tools.

That said, tab completion for stack exec would be really nice. optparse-applicative has some support for custom completors, and it might be possible to use that to pass completion through to the command being execed, but I have no idea how difficult that would be. A pull request would be most welcome!

@wolftune
Contributor
wolftune commented Sep 7, 2015

So, I discovered https://github.com/commercialhaskell/stack/wiki/Shell-autocompletion now… that's nice enough, though I think it just allows completion for stack arguments. Better than not having that, though it isn't what I wanted here really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment