[![Joknarf Tools](https://img.shields.io/badge/Joknarf%20Tools-Visit-darkgreen?logo=github)](https://joknarf.github.io/joknarf-tools) [![bash](https://img.shields.io/badge/shell-bash%20|%20zsh%20-blue.svg)]() [![Licence](https://img.shields.io/badge/licence-MIT-blue.svg)](https://shields.io/) # complete-ng bash/zsh Tab completion nextgen with interactive/search menu and parameters description image ## features * replace bash/zsh completion multiple choices output by interactive selector menu * display parameters help description * browse directories inside the menu * view/edit files directly from the menu * single Tab on command line displays choices * launch menu from empty command line with Tab to browse files/directories ## pre-requisites * gnu awk (need brew install gawk on macOS) * gnu grep (need brew install grep on macOS) * bash-completion/zsh-completion ## install You can use a shell plugin manager like the famous [thefly](https://github.com/joknarf/thefly) (multi shell plugin/dotfiles manager and teleporter anywhere) ``` fly add joknarf/complete-ng ``` or just ``` git clone https://github.com/joknarf/complete-ng source complete-ng/complete-ng.plugin. ``` for a complete next-gen shell experience, see also this project: * [joknarf/shell-ng](https://github.com/joknarf/shell-ng) : compilation of joknarf shell plugins which includes * [joknarf/nerdp](https://github.com/joknarf/nerdp) : dynamic PS1 prompt (you can see it in the demo) * [joknarf/complete-ng](https://github.com/joknarf/complete-ng) : Tab completion nextgen (this plugin) * [joknarf/redo](https://github.com/joknarf/redo) : replacement of shell history command search (CtrlR or Esc/) with interactive menu * [joknarf/seedee](https://github.com/joknarf/seedee) : directory history navigation with arrows + interactive menu ## demo ![complete-ng](https://github.com/joknarf/complete-ng/assets/10117818/e8993060-4134-4ab5-8a1f-c2ea6d0d5696) ![demo](https://github.com/joknarf/complete-ng/assets/10117818/44831cb1-ea69-4982-9852-e339a453e803) ## file/folder icons As depending to your terminal font, the icons may not render correctly, you can choose the icons you want using environment variables, here are some sample of dir/file icons, choose the ones fitting your terminal font (use nerd version of your font to have more choice): ``` SELECTOR_FOLDER_ICON='' # 🖿 🗀 📁 📂 🖿      SELECTOR_FILE_ICON='' #  🗎            🗋 🖹   ``` ## keys in menu |key | action | |--------------------------------|-------------------------------------------------------| |▼ | select next item | |▲ | select prev item | |End | select last item | |Home | select first item | |▶ | browse selected directory | |◀ | browse parent directory | |F3 | view file using PAGER (or less) | |F4 | edit file usint EDITOR (or vi) | |Shift▼/PgUp/CtlF| next page | |Shift▲/PgDn/CtlB| previous page | |Esc | exit | |CtrlA | use all screen to display menu | |Enter/Tab | put selected item on command line |