summaryrefslogtreecommitdiff
path: root/hadrian/completion.sh
blob: 2f31123c5b8a1765975a21659307d95aaaced536 (plain)
1
2
3
4
5
6
7
#!/usr/bin/env bash

hadrian=$(cd hadrian; cabal new-exec which hadrian; cd ..)
all_settings=$($hadrian autocomplete --complete-setting="$@" --quiet)

complete -W "$all_settings" hadrian/build
complete -W "$all_settings" hadrian/build-cabal