3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/continuous-integration/fly/fly.bash
ivanbrennan 9e465d2f60
fly: init at 5.3.0
Add `fly` CLI for working with Concourse CI, and include Bash
completions.
2019-07-13 18:55:22 -04:00

11 lines
343 B
Bash

# credits:
# https://godoc.org/github.com/jessevdk/go-flags#hdr-Completion
# https://github.com/concourse/concourse/issues/1309#issuecomment-452893900
_fly_compl() {
args=("${COMP_WORDS[@]:1:$COMP_CWORD}")
local IFS=$'\n'
COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}"))
return 0
}
complete -F _fly_compl fly