Autocomplete

    Unlike other auto-complete tools, Fig is more intuitive. It brings an IDE-style experience to the terminal users. Detailed introduction see the

    Notice: Temporary only supports MacOS now!

    See https://fig.io

    Autocomplete - 图2

    Once the installation is complete, you need to integrate the terminal you are using.

    Examples

    Get Specified Plugin Information

    Get Subcommand Help Information

    Autocomplete - 图4

    Build a Specified Plugin

    Shell Autocomplete

    On Linux

    The completion script depends on , So you have to install it first.

    The above commands create /usr/share/bash-completion/bash_completion, which is the main script of bash-completion. Depending on your package manager, you have to manually source this file in your ~/.bashrc file.

    To find out, reload your shell and run type _init_completion. If the command succeeds, you’re already set, otherwise add the following to your ~/.bashrc file:

      Reload your shell and verify that bash-completion is correctly installed by typing type _init_completion.

      Then You can generate completion script for Bash with the command dtm completion bash and add the following line to your file:

      1. echo 'source <(dtm completion bash)' >>~/.bashrc

      After reloading your shell, dtm autocompletion should be working!

      On MacOS

      ```{admonition} Note :class: note Main reference bash auto-completion on macOS

      As stated in the output of this command, add the following to your ~/.bash_profile file:

      1. export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d"
      2. [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"

      Reload your shell and verify that bash-completion v2 is correctly installed with type _init_completion.

      1. echo 'source <(dtm completion bash)' >>~/.bash_profile

      After reloading your shell, dtm autocompletion should be working!

      Zsh Autocompletion

      You can generate completion script for Zsh with the command . Then add the following line to your ~/.zshrc file:

      After reloading your shell, dtm autocompletion should be working!

      You can generate completion script for Fish with the command dtm completion fish.Then add the following line to your ~/.config/fish/config.fish file:

      1. dtm completion fish | source

      After reloading your shell, dtm autocompletion should be working!

      PowerShell Autocompletion

      You can generate completion script for PowerShell with the command dtm completion powershell. Then add the following line to your $PROFILE file:

      1. dtm completion powershell | Out-String | Invoke-Expression

      This command will regenerate the auto-completion script on every PowerShell start up. You can also add the generated script directly to your $PROFILE file.

      To add the generated script to your file, run the following line in your powershell prompt:

      After reloading your shell, dtm autocompletion should be working.