completions
The completions command prints a shell completion script for the graphql CLI to stdout. Redirect the output to the location your shell loads completions from.
graphql completions <SHELL>Supported shells
Section titled “Supported shells”bash, zsh, fish, powershell, elvish
Installation
Section titled “Installation”graphql completions bash > ~/.local/share/bash-completion/completions/graphqlOr system-wide:
graphql completions bash | sudo tee /etc/bash_completion.d/graphql > /dev/nullMake sure the target directory is on your $fpath, then:
graphql completions zsh > ~/.zfunc/_graphqlIf you use Oh My Zsh:
graphql completions zsh > ~/.oh-my-zsh/completions/_graphqlYou may need to run compinit (or restart your shell) for completions to load.
graphql completions fish > ~/.config/fish/completions/graphql.fishPowerShell
Section titled “PowerShell”graphql completions powershell | Out-String | Invoke-ExpressionTo persist, add the line above to your PowerShell profile ($PROFILE).
Elvish
Section titled “Elvish”graphql completions elvish > ~/.config/elvish/lib/graphql-completions.elvThen in your rc.elv:
use graphql-completions