DEV Community

Enmanuel Jarquín
Enmanuel Jarquín

Posted on

1 1

Autosuggestions with oh-my-zsh

New Macs already include zsh by default, so what we only need is to run the following command:

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Enter fullscreen mode Exit fullscreen mode

The first step created us the following the /.oh-my-zsh directory

echo $ZSH_CUSTOM
>> /Users/<your home directory>/.oh-my-zsh/custom
Enter fullscreen mode Exit fullscreen mode

Install autosuggestions plugin

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

That command will copy the zsh-autosuggestions repo into /Users/<your home directory>/.oh-my-zsh/custom/plugins

Now we are going to add new plugin by opening the file ~/.zshrc and add the zsh-autosuggestions plugin without commas

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

Restart your terminal and now when you type a command that you used previously you will see that now it will auto suggest you using a gray text.
Image description

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up