zsh completion requires sourcing and can't get autoloaded easily

Open
#764 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
zsh
Domain
cli

Research direction

Start by locating the current zsh completion definition and inspect its wrapping function. Test the completion through $fpath with autoload _exercism in .zshrc; done means zsh loads the completion only when completing an exercism argument without manual sourcing.

Written by the indexing model from the issue text.

Description

The current version of the zsh completion does not support zsh autoloading.

This can be repaired by removing the wrapping function (removing first and last line basically) and naming it _exercism. One can simply throw it into the $fpath and add autoload _exercism to the .zshrc.

Then zsh would only try to load the function if one tries to complete an argument to exercism.

Can we change the zsh completion to be more autoload friendly?

Dominant language
Go
Stars
1.4k
Forks
363
Avg merge
6d 13h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/cli

All issues in exercism/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.