Install zsh-autocomplete on WSL2

0xkoji - Jun 15 - - Dev Community

What is zsh-autocomplete?

Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.

GitHub logo marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.

Autocomplete for Zsh

This plugin for Zsh adds real-time type-ahead autocompletion to your command line, similar to what you find desktop apps. While you type on the command line, available completions are listed automatically; no need to press any keyboard shortcuts. Press Tab to insert the top completion or to select a different one.

Additional features:

  • Out-of-the-box configuration of Zsh's completion system
  • Multi-line history search
  • Completion of recent directories
  • Useful keyboard shortcuts
  • Easy to configure

Enjoy using this software? Become a sponsor! 💝

Requirements

Recommended:

  • Tested to work with Zsh 5.8 and newer.

Minimum:

  • Should theoretically work with Zsh 5.4, but I'm unable to test that.

Installation & setup

First, install Autocomplete itself. Here are some way to do so:

  • To use only releases (instead of the main branch), install zsh-autocomplete with a package manager. As of this writing, this package is available through Homebrew, Nix, pacman, Plumage…

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
Enter fullscreen mode Exit fullscreen mode

Add the following to .zshrc

plugins=( 
    git
    zsh-autosuggestions
)
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .