pce / clibar

simple command line interface (prototype)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clibar

simple command line interface

Build Status

features

  • command line loop
  • map commands to callbacks void example_callback(char* line)

wishlist

  • parse parameter/args
  • support keys (escape sequences, arrows, tabs)
  • history (readline features)

example

#include "clibar.h"

void hello (char *line)
{
    printf("%s\n", "World!");
}

int main(int argc, char **argv)
{
    cliAddCmd((CliCmd){.cmd="hello", .callback=hello});
    int ret = cliLoop();
    return ret;
}

About

simple command line interface (prototype)


Languages

Language:C++ 70.5%Language:C 29.1%Language:Makefile 0.4%