Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A zsh completion plugin for Lets

License

NotificationsYou must be signed in to change notification settings

lets-cli/lets-zsh-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Lets is a cli tool for developers that is a better alternative to make -https://github.com/lets-cli/lets

Install as plugin

oh-my-zsh

Just clone plugin to oh-my-zsh plugins directory

cd~/.oh-my-zsh/custom/plugins/git clone https://github.com/lets-cli/lets-zsh-plugin.git lets

Open~/.zshrc and addlets toplugins

 plugins=(lets)

zinit

Add to your~/.zshrc

zinit load lets-cli/lets-zsh-plugin

Manual completions setup

You can set up completions manually (no plugins).

Usually to make completion works you have to make sure that:

  1. A file with completions exists
  2. A path to directory with a file with completions is in$fpath env.

lets can generate completions script for you

lets completion -s zsh

This will print completion script, and you have to save it somewhere, for example:

lets completion -s zsh~/.my-completions/_lets

Now, add~/.my-completions/_lets tofpath

fpath=(~/.my-completions$fpath)

And just to be sure that everything will work as expected fine, rebuildzcompdump:

rm -f~/.zcompdump; compinit

Do not forget to add autoload call to the end of file (it actually can be after plugins section, but its better to add it to the end of~/.zshrc)

autoload -U compinit&& compinit

Restart terminal

exec$SHELL -l

Manual configuration for zinit

Sincezinit adds~/.local/share/zinit/completions tofpath, you just need to put completions to that directory:

lets completion -s zsh>~/.local/share/zinit/completions/_lets

Manual configuration for oh-my-zsh

Foroh-my-zsh these are usually one of the following directories infpath:

  • ~/.oh-my-zsh/completions
  • ~/.zsh/completions
lets completion -s zsh>~/.oh-my-zsh/completions/_lets.zsh

Source completions on shell load

You can just addsource <(lets completion -s zsh) to your~/.zshrc file, save it and reload shell. Completions should work.

If completions does not work, try to putsource <(lets completion -s zsh) after line withautoload -U compinit && compinit, like this:

autoload -U compinit&& compinitsource<(lets completion -s zsh)

Configution

For zsh there is--verbose flag which generate completions with descriptions, like this:

lets<tab>... generated completionsbuild  -- Build my apprun    -- Run my apptest   -- Test my app
lets completion -s zsh --verbose

About

A zsh completion plugin for Lets

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp