All Projects → DieTime → CLI-Autocomplete

DieTime / CLI-Autocomplete

Licence: MIT license
Cross-platform flexible autocomplete library for your CLI applications.

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to CLI-Autocomplete

Autoprompt
Auto complete command prompts for C# .Net console apps
Stars: ✭ 22 (+4.76%)
Mutual labels:  console, autocomplete, autocompletion
Smartmaterialspinner
The powerful android spinner library for your application
Stars: ✭ 108 (+414.29%)
Mutual labels:  autocomplete, hint
Cmake Ide
Use Emacs as a C/C++ IDE
Stars: ✭ 661 (+3047.62%)
Mutual labels:  autocomplete, autocompletion
Vim You Autocorrect
Why should smartphones get all the fun?
Stars: ✭ 173 (+723.81%)
Mutual labels:  autocomplete, autocompletion
Autocomplete
Suggests and completes words as you type! Write faster and more efficiently.
Stars: ✭ 18 (-14.29%)
Mutual labels:  autocomplete, autocompletion
Bit
Bit is a modern Git CLI
Stars: ✭ 5,723 (+27152.38%)
Mutual labels:  autocomplete, prompt
Modernsearchbar
The famous iOS search bar with auto completion feature implemented.
Stars: ✭ 167 (+695.24%)
Mutual labels:  autocomplete, autocompletion
Ide Stubs
Phalcon IDE Stubs
Stars: ✭ 137 (+552.38%)
Mutual labels:  autocomplete, autocompletion
Inquirer.cs
A collection of common interactive command line user interfaces. Port of Inquirer.js
Stars: ✭ 26 (+23.81%)
Mutual labels:  console, prompt
enquirer
Stylish, intuitive and user-friendly prompts, for Node.js. Used by eslint, webpack, yarn, pm2, pnpm, RedwoodJS, FactorJS, salesforce, Cypress, Google Lighthouse, Generate, tencent cloudbase, lint-staged, gluegun, hygen, hardhat, AWS Amplify, GitHub Actions Toolkit, @airbnb/nimbus, and many others! Please follow Enquirer's author: https://github.…
Stars: ✭ 6,523 (+30961.9%)
Mutual labels:  console, prompt
django-search-admin-autocomplete
Simple django app that add autocomplete to search inside admin panel.
Stars: ✭ 28 (+33.33%)
Mutual labels:  autocomplete, autocompletion
zsh-yarn-completions
Yarn completions for Z-shell that supports yarn workspaces
Stars: ✭ 35 (+66.67%)
Mutual labels:  autocomplete, autocompletion
fast-autocomplete
Fast Autocomplete: When Elastcsearch suggestions are not fast and flexible enough
Stars: ✭ 201 (+857.14%)
Mutual labels:  autocomplete, autocompletion
Zsh Autocomplete
🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
Stars: ✭ 641 (+2952.38%)
Mutual labels:  autocomplete, autocompletion
xontrib-prompt-bar
The bar prompt for xonsh shell with customizable sections and Starship support.
Stars: ✭ 27 (+28.57%)
Mutual labels:  console, prompt
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (+152.38%)
Mutual labels:  console, autocomplete
vscode-allautocomplete
Autocomplete from open files for VSCode
Stars: ✭ 90 (+328.57%)
Mutual labels:  autocomplete, autocompletion
leeks.js
Simple ANSI styling for your terminal
Stars: ✭ 12 (-42.86%)
Mutual labels:  console
congif
convert script(1) output to GIF
Stars: ✭ 52 (+147.62%)
Mutual labels:  console
VPAutoComplete
A simple Auto Complete UITextField also support UITableView written in swift 4.2
Stars: ✭ 20 (-4.76%)
Mutual labels:  autocomplete

logo

version

About

Cross-platform flexible autocomplete library for your CLI applications

preview gif

Features

  • Cross-platform: MacOS, Linux, Windows
  • Write your own autocomplete rules
  • Setup your own highlight colors
  • single header version of the library
  • static and dynamic versions of the library

Config Example

  1. After git may follow: config, init, clone
  2. After config may follow: --global, user.name, user.email
  3. After --global may follow: user.name, user.email
  4. After user.name may follow optional value: "[name]"
  5. ...
git
    config
        --global
            user.name
                "[name]"
            user.email
                "[email]"
        user.name
            "[name]"
        user.email
            "[email]"
    init
        [repository_name]
    clone
        [url]

Simple Example

More complex example with: color settings, handling optional values and line title configuration you will find here

#include <stdio.h>

#include "../include/autocomplete.h"

int main() {
    // Parsing the configuration file
    Tree* rules = tree_create("../example.config");

    fprintf(
        stderr,
        "Attention! Please run the executable file only\n"
        "           through the command line!\n\n"

        "- To switch the prompts press UP or DOWN arrow.\n"
        "- To move cursor press LEFT or RIGHT arrow.\n"
        "- To edit input press DELETE or BACKSPACE key.\n"
        "- To apply current prompt press TAB key.\n\n"
    );

    // Listening process
    while (1) {
        // Get user input
        char* str = input(rules);
        printf("\n%s\n", str);

        // Stop listening if user need
        if (strcmp(str, "") == 0) {
            free(str);
            break;
        }

        // Free user input string
        free(str);
    }

    // Free rules
    tree_free(rules);

    return 0;
}

How to start

git clone https://github.com/DieTime/CLI-AutoComplete.git
cd CLI-AutoComplete/

cmake -DCMAKE_BUILD_TYPE=Release -S . -B ./cmake-build
cmake --build ./cmake-build --config Release

----------------------- RUN EXAMPLE ---------------------

# Unix
cd builds/examples/unix/Release
./custom_example

# MinGW
cd builds/examples/mingw/Release
custom_example.exe

# MSVC
cd builds/examples/msvc/Release
custom_example.exe

Linking a shared library [Releases]

Unix
gcc -o <executable> <paths/of/source/files> -L<path/to/shared/lib/folder> -I<path/to/include/folder> -lcliac -Wl,-rpath,<path/to/shared/lib/folder>
Windows MSVC from VS Command Prompt
cl /EHsc <paths/of/source/files> /Fe<executable>.exe /I<path/to/include/folder> /link <path/to/shared/lib/file(.lib)>
Windows MinGW
gcc -o <executable>.exe <paths/of/source/files> -L<path/to/shared/lib/folder> -I<path/to/include/folder> -lcliac

Linking a static library [Releases]

Unix
gcc -o <executable> <paths/of/source/files> -L<path/to/static/lib/folder> -I<path/to/include/folder> -lcliac
Windows MSVC from VS Command Prompt
cl /EHsc <paths/of/source/files> /Fe<executable>.exe /I<path/to/include/folder> /link <path/to/static/lib/file(.lib)>
Windows MinGW
gcc -o <executable>.exe <paths/of/source/files> -L<path/to/static/lib/folder> -I<path/to/include/folder> -lcliac

About changes

A detailed description of the changes can be found in CHANGELOG.md

Support the author

You can support me so that there will be more good open source projects in the future

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].