github.com/cozy/cozy-stack@v0.0.0-20240603063001-31110fa4cae1/docs/cli/cozy-stack_completion.md (about)

     1  ## cozy-stack completion
     2  
     3  Output shell completion code for the specified shell
     4  
     5  ### Synopsis
     6  
     7  
     8  Output shell completion code for the specified shell (bash, zsh, or fish). The
     9  shell code must be evalutated to provide interactive completion of cozy-stack
    10  commands.
    11  
    12  Bash:
    13  
    14    $ source <(cozy-stack completion bash)
    15  
    16    # To load completions for each session, execute once:
    17    # Linux:
    18    $ cozy-stack completion bash > /etc/bash_completion.d/cozy-stack
    19    # macOS:
    20    $ cozy-stack completion bash > $(brew --prefix)/etc/bash_completion.d/cozy-stack
    21  
    22  Note: this requires the bash-completion framework, which is not installed by
    23  default on Mac.  This can be installed by using homebrew:
    24  
    25      $ brew install bash-completion
    26  
    27  Once installed, bash_completion must be evaluated.  This can be done by adding the
    28  following line to the .bash_profile
    29  
    30      $ source $(brew --prefix)/etc/bash_completion
    31  
    32  Zsh:
    33  
    34    # If shell completion is not already enabled in your environment,
    35    # you will need to enable it.  You can execute the following once:
    36  
    37    $ echo "autoload -U compinit; compinit" >> ~/.zshrc
    38  
    39    # To load completions for each session, execute once:
    40    $ cozy-stack completion zsh > "${fpath[1]}/_cozy-stack"
    41  
    42    # You will need to start a new shell for this setup to take effect.
    43  
    44  fish:
    45  
    46    $ cozy-stack completion fish | source
    47  
    48    # To load completions for each session, execute once:
    49    $ cozy-stack completion fish > /etc/fish/completions/cozy-stack.fish
    50  
    51  
    52  ```
    53  cozy-stack completion <shell> [flags]
    54  ```
    55  
    56  ### Options
    57  
    58  ```
    59    -h, --help   help for completion
    60  ```
    61  
    62  ### Options inherited from parent commands
    63  
    64  ```
    65        --admin-host string   administration server host (default "localhost")
    66        --admin-port int      administration server port (default 6060)
    67    -c, --config string       configuration file (default "$HOME/.cozy.yaml")
    68        --host string         server host (default "localhost")
    69    -p, --port int            server port (default 8080)
    70  ```
    71  
    72  ### SEE ALSO
    73  
    74  * [cozy-stack](cozy-stack.md)	 - cozy-stack is the main command
    75