github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/cmd/swagger/completion/swagger.bash-completion (about) 1 _swaggercomp() { 2 # All arguments except the first one 3 args=("${COMP_WORDS[@]:1:$COMP_CWORD}") 4 5 # Only split on newlines 6 local IFS=$'\n' 7 8 # Call completion (note that the first element of COMP_WORDS is 9 # the executable itself) 10 COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}")) 11 return 0 12 } 13 14 complete -F _swaggercomp swagger