Português (Portuguese)
Appearance
Português (Portuguese)
Appearance
If you have Tuist globally installed (e.g., via Homebrew), you can install shell completions for Bash and Zsh to autocomplete commands and options.
WHAT IS A GLOBAL INSTALLATION
A global installation is an installation that's available in your shell's $PATH environment variable. This means you can run tuist from any directory in your terminal. This is the default installation method for Homebrew.
If you have oh-my-zsh installed, you already have a directory of automatically loading completion scripts — .oh-my-zsh/completions. Copy your new completion script to a new file in that directory called _tuist:
tuist --generate-completion-script > ~/.oh-my-zsh/completions/_tuistWithout oh-my-zsh, you'll need to add a path for completion scripts to your function path, and turn on completion script autoloading. First, add these lines to ~/.zshrc:
fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinitNext, create a directory at ~/.zsh/completion and copy the completion script to the new directory, again into a file called _tuist.
tuist --generate-completion-script > ~/.zsh/completion/_tuistIf you have bash-completion installed, you can just copy your new completion script to file /usr/local/etc/bash_completion.d/_tuist:
tuist --generate-completion-script > /usr/local/etc/bash_completion.d/_tuistWithout bash-completion, you'll need to source the completion script directly. Copy it to a directory such as ~/.bash_completions/, and then add the following line to ~/.bash_profile or ~/.bashrc:
source ~/.bash_completions/example.bashIf you use fish shell, you can copy your new completion script to ~/.config/fish/completions/tuist.fish:
mkdir -p ~/.config/fish/completions
tuist --generate-completion-script > ~/.config/fish/completions/tuist.fish