adding deno completions on Mac Catalina

So, on Deno going 1.0, I decided to give it a try today.

The getting-started doc explains clearly that we can use deno completions <shell> to generate completions definition for deno.

But being new to zsh (the default shell on Mac Catalina), I didn’t know where best to install this completions definition to. So I chose the “typical location” mentioned in a Docker doc: ~/.zsh/completion

So, to sum it up (and to help me with similar future chores), here goes what I did:

mkdir -p ~/.zsh/completion
deno completion zsh > ~/.zsh/completion/_deno

# then ensure we have these 2 lines in our ~/.zshrc
# fpath=(~/.zsh/completion $fpath)
# autoload -Uz compinit && compinit -i

# finally reload the shell
exec $SHELL -l

And voilà:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s