Skip to content

kurahaupo/zcomp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

zcomp

menu-style completion for tab-completion

Installation

With the bash-completion package

Assuming you have the bash-completion package installed, it should simply be a matter of installing src/_zcomp.bash in either your personal ~/.bash_completion.d or in the system /etc/bash_completion.d.

Adjust its name so that it's

  1. legal for the framework you're using; and
  2. loaded as early as possible.

The recommended installation path is /etc/bash_completion.d/000_zcomp.bash.

The reason it should be loaded early is because it defines a function called complete which will then be unwittingly called by all the other completion scripts. It will still work if it's loaded later, but it will be slower, because it will also need to replace all the existing completions.

Stand-alone

Install as above, but then edit your personal ~/.bashrc or the system /etc/bash.bashrc and add a line to source it:

  • . /etc/bash_completion.d/000_zcomp.bash
  • . "$HOME"/.bash_completion.d/000_zcomp.bash

Again, you can put this anywhere in the file, but it will be faster if you put it before any other completions are defined.

Usage

image

About

menu-style completion for tab-completion

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages