Skip to content

Mdz (CLI)

Felipe Gomes edited this page Nov 5, 2024 · 1 revision

Autocomplete

Setup

Please verify if you have autocomplete enabled globally, otherwise the autocomplete for cli will not work

Dependencies zsh

You need to install zsh-autosuggestions

MacOs
brew install zsh-autosuggestions
Archlinux
sudo pacman -S zsh-autosuggestions
Ubuntu
sudo apt install zsh-autosuggestions
Fedora
sudo dnf install zsh-autosuggestions
Alpine
sudo apk add zsh-autosuggestions
Shell
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Config zsh

MacOs / Linux

Run

echo "autoload -U compinit; compinit" >> ~/.zshrc 

Run

echo "source <(mdz completion zsh); compdef _mdz mdz" >> ~/.zshrc

Run

source ~/.zshrc

Dependencies zsh

You need to install bash-completion

MacOs
brew install bash-completion
Archlinux
sudo pacman -S bash-completion
Ubuntu
sudo apt install bash-completion

Config bash

MacOs / Linux

Run

echo "source <(mdz completion bash)" >> ~/.bashrc 

Run

source ~/.zshrc

Dependencies fish

Run the command below once

echo "mdz completion fish | source" >> ~/.config/fish/config.fish