An open API service indexing awesome lists of open source software.

https://github.com/joknarf/complete-ng

bash completion nextgen
https://github.com/joknarf/complete-ng

bash completion interactive menu nextgen plugin

Last synced: 9 months ago
JSON representation

bash completion nextgen

Awesome Lists containing this project

README

          

# complete-ng
bash completion nextgen

* replace bash completion multiple choices output by interactive selector menu
* 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

for a complete next-gen shell experience, see also these projects:
* [nerdps1](https://github.com/joknarf/nerdps1) : auto-transportable dynamic PS1 prompt (you can see it in the demo)
* [redo](https://github.com/joknarf/redo) : replacement of shell history command search (Ctrl+R or Esc+/) with interactive menu
* [cdhist](https://github.com/joknarf/cdhist) : directory history navigation with arrows + interactive menu

# usage

```
source ./complete-ng
```

## example

![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/Ctl+F| next page |
|Shift+/PgDn/Ctl+B| previous page|
|Esc | exit |
|Ctrl+A | use all screen to display menu |
|Enter/Tab | put selected item on command line |