Coder Social home page Coder Social logo

honsa / zsh-autocomplete Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marlonrichert/zsh-autocomplete

0.0 0.0 0.0 4.22 MB

๐Ÿค– Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.

License: MIT License

Shell 100.00%

zsh-autocomplete's Introduction

zsh-autocomplete

zsh-autocomplete adds real-time type-ahead autocompletion to Zsh. Find as you type, then press Tab to insert the top completion, ShiftTab to insert the bottom one, or โ†“/PgDn to select another completion.

file-search

Enjoy using this software? Become a sponsor!.

Other Features

Besides live autocompletion, zsh-autocomplete comes with many other useful completion features.

Optimized completion config

Zsh's completion system is powerful, but hard to configure. So, zsh-autocomplete does it for you, while providing a manageable list of configuration settings for changing the defaults.

Live history search

Press CtrlR or CtrlS to do live, multi-line history search.

history-search

History menu

Press โ†‘ (or Altโ†‘ or PgUp) to open a menu with the last 16 history items. If the command line is not empty, then the contents of the command line are used to perform a fuzzy history search.

history menu

Multi-selection

Press CtrlSpace in the completion menu or the history menu to insert more than one item.

multi-select

Recent dirs completion

Works out of the box with zero configuration, but also supports zsh-z, zoxide, z.lua, rupa/z.sh, autojump and fasd.

recent dirs

Key Bindings

On the command line:

Key(s) Action Widget
Tab Insert top completion complete-word
ShiftTab Insert bottom completion complete-word
CtrlSpace Show additional completions list-expand
โ†“ Cursor down (if able) or completion menu down-line-or-select
PgDn / Altโ†“ Completion menu (always) menu-select
โ†‘ Cursor up (if able) or history menu up-line-or-search
PgUp / Altโ†‘ History menu (always) history-search
CtrlR Live history search, newest to oldest history-incremental-search-backward
CtrlS Live history search, oldest to newest history-incremental-search-forward

In the completion menu:

Key(s) Action
โ†‘ / โ†“ / โ† / โ†’ Change selection
Altโ†‘ Backward one group
Altโ†“ Forward one group
PgUp / PgDn Page up/down
CtrlR Find text forward
CtrlS Find text backward
Tab Insert selection and exit menu
CtrlSpace Insert selection, but stay in menu
ShiftTab Insert bottom completion and exit menu
Ctrl-
Ctrl/
Undo and exit menu
Enter Submit command line
other keys Zsh default behavior

In the history menu:

Key(s) Action
โ†‘ / โ†“ Change selection
Tab Insert selection and exit menu
CtrlSpace Insert selection, but stay in menu
Ctrl-
Ctrl/
Undo and exit menu
Enter Submit command line
other keys Zsh default behavior

Requirements

Recommended:

  • Tested to work with Zsh 5.7 or newer.

Minimum:

  • Should theoretically work with Zsh 5.4 or newer, but I'm unable to test that.

Installing & Updating

If you use Znap, simply add the following to your .zshrc file:

znap source marlonrichert/zsh-autocomplete

Then restart your shell.

To update, do

% znap pull

For configuration options, see the included .zshrc file.

To uninstall, remove znap source marlonrichert/zsh-autocomplete from your .zshrc file, then run

% znap uninstall

Manual installation

  1. Clone the repo:
    % cd ~/Git  # ...or wherever you keep your Git repos/Zsh plugins
    % git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
  2. Add at or near the top of your .zshrc file (before any calls to compdef):
    source ~/Git/zsh-autocomplete/zsh-autocomplete.plugin.zsh
  3. Remove any calls to compinit from your .zshrc file.
  4. If you're using Ubuntu, add to your .zshenv file:
    skip_global_compinit=1

Then restart your shell.

To update, do:

% git -C ~zsh-autocomplete pull

To uninstall, simply undo the installation steps above in reverse order:

  1. Restore the lines you deleted in step 3.
  2. Delete the line you added in step 2.
  3. Delete the repo you created in step 1. Finally, restart your shell.

Other Frameworks/Plugin Managers

To install with another Zsh framework or plugin manager, please refer to your framework's/plugin manager's documentation for instructions.

Troubleshooting

Try the steps in the bug report template.

Author

ยฉ 2020-2021 Marlon Richert

License

This project is licensed under the MIT License. See the LICENSE file for details.

zsh-autocomplete's People

Contributors

marlonrichert avatar aaronkollasch avatar alfredjkwack avatar gordiandziwis avatar cscribn avatar jaakkonen avatar mordna avatar stefanlobbenmeier avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.