mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-24 07:52:14 +03:00
c3e60aba28
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com> Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com> GitOrigin-RevId: b6909583093baac4a69296721feae149ca6a0605
82 lines
2.2 KiB
ReStructuredText
82 lines
2.2 KiB
ReStructuredText
.. meta::
|
|
:description: Generate auto completion code using the Hasura CLI
|
|
:keywords: hasura, docs, CLI, hasura completion
|
|
|
|
.. _hasura_completion:
|
|
|
|
Hasura CLI: hasura completion
|
|
-----------------------------
|
|
|
|
Generate auto completion code.
|
|
|
|
Synopsis
|
|
~~~~~~~~
|
|
|
|
|
|
Output shell completion code for the specified shell (bash or zsh).
|
|
|
|
::
|
|
|
|
hasura completion [shell] [flags]
|
|
|
|
Examples
|
|
~~~~~~~~
|
|
|
|
::
|
|
|
|
# Bash
|
|
# Linux
|
|
# Add Bash completion file using:
|
|
$ sudo hasura completion bash --file=/etc/bash_completion.d/hasura
|
|
# 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:
|
|
$ cd ~ && hasura completion bash --file=.bash_completion.d/hasura
|
|
# 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
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
::
|
|
|
|
--envfile string .env filename to load ENV vars from (default ".env")
|
|
--log-level string log level (DEBUG, INFO, WARN, ERROR, FATAL) (default "INFO")
|
|
--no-color do not colorize output (default: false)
|
|
--project string directory where commands are executed (default: current dir)
|
|
--skip-update-check skip automatic update check on command execution
|
|
|
|
SEE ALSO
|
|
~~~~~~~~
|
|
|
|
* :ref:`hasura <hasura>` - Hasura GraphQL engine command line tool
|
|
|
|
*Auto generated by spf13/cobra*
|