Created
June 16, 2022 10:57
-
-
Save adrianbiro/9d51d2ed2dee9c72fb156437b49543ad to your computer and use it in GitHub Desktop.
Bash competition for go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function completego() | |
# Bash completion for go | |
{ | |
local wordlist; wordlist=$(go help | awk 'NR==9, NR==26{ printf "%s%s", $1, sp = NR==26? "\n": " "}') | |
complete -W "${wordlist}" go | |
} | |
completego |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment