2020-01-14 15:57:45 +03:00
|
|
|
.. meta::
|
|
|
|
:description: Use hasura completion to output shell completion code for the specified shell on the Hasura CLI
|
|
|
|
:keywords: hasura, docs, CLI, hasura completion
|
|
|
|
|
2018-09-11 14:11:24 +03:00
|
|
|
.. _hasura_completion:
|
|
|
|
|
|
|
|
Hasura CLI: hasura completion
|
|
|
|
-----------------------------
|
|
|
|
|
2019-09-11 10:17:14 +03:00
|
|
|
Generate auto completion code.
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
Synopsis
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
|
2019-09-11 10:17:14 +03:00
|
|
|
Output shell completion code for the specified shell (bash or zsh).
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
hasura completion [shell] [flags]
|
|
|
|
|
|
|
|
Examples
|
|
|
|
~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2019-03-20 08:10:06 +03:00
|
|
|
# Bash
|
2018-09-11 14:11:24 +03:00
|
|
|
# Linux
|
|
|
|
# Add Bash completion file using:
|
2018-12-07 15:08:39 +03:00
|
|
|
$ sudo hasura completion bash --file=/etc/bash.completion.d/hasura
|
2018-09-11 14:11:24 +03:00
|
|
|
# Mac
|
|
|
|
# Install bash-completion using homebrew:
|
|
|
|
$ brew install bash-completion
|
|
|
|
# Add to your ~/.bash_profile:
|
|
|
|
if [ -f $(brew --prefix)/etc/bash_completion ]; then
|
|
|
|
. $(brew --prefix)/etc/bash_completion
|
|
|
|
fi
|
|
|
|
# Add the completion file:
|
|
|
|
$ sudo hasura completion bash --file=$(brew --prefix)/etc/bash_completion.d/hasura
|
|
|
|
# Windows (Git Bash)
|
|
|
|
# open git bash
|
|
|
|
$ mkdir -p ~/.bash_completion.d
|
|
|
|
# Add the completion file:
|
2019-03-28 04:58:20 +03:00
|
|
|
$ cd ~ && hasura completion bash --file=.bash_completion.d/hasura
|
2018-09-11 14:11:24 +03:00
|
|
|
# Add the following to ~/.bash_profile
|
|
|
|
if [ -f ~/.bash_completion.d/hasura ]; then
|
|
|
|
. ~/.bash_completion.d/hasura
|
|
|
|
fi
|
|
|
|
# restart git bash
|
|
|
|
|
|
|
|
# Zsh (using oh-my-zsh)
|
|
|
|
$ mkdir -p $HOME/.oh-my-zsh/completions
|
|
|
|
$ hasura completion zsh --file=$HOME/.oh-my-zsh/completions/_hasura
|
|
|
|
|
|
|
|
# Reload the shell for the changes to take effect!
|
|
|
|
|
|
|
|
Options
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
--file string file to which output has to be written
|
|
|
|
-h, --help help for completion
|
|
|
|
|
|
|
|
Options inherited from parent commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2020-05-11 15:14:48 +03:00
|
|
|
--envfile string .env filename to load ENV vars from (default ".env")
|
2019-03-20 08:10:06 +03:00
|
|
|
--log-level string log level (DEBUG, INFO, WARN, ERROR, FATAL) (default "INFO")
|
2019-12-02 13:57:17 +03:00
|
|
|
--no-color do not colorize output (default: false)
|
2019-03-20 08:10:06 +03:00
|
|
|
--project string directory where commands are executed (default: current dir)
|
2020-02-24 19:19:14 +03:00
|
|
|
--skip-update-check skip automatic update check on command execution
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
~~~~~~~~
|
|
|
|
|
2019-09-11 10:17:14 +03:00
|
|
|
* :ref:`hasura <hasura>` - Hasura GraphQL engine command line tool
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
*Auto generated by spf13/cobra*
|