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

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more