Skip to content

thyforhtian/fuzzy_cli_menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fuzzy_cli_menu

Simple cli menu with fuzzy filtering

fuzzy_cli_menu_in_action

Installation

npm install fuzzy_cli_menu

Usage

var fcm = require("fuzzy_cli_menu");

const menuItems = [{
  "name": "Skivee",
  "value": function() {
    console.log('clicked');
  }
}, {
  "name": "JumpXS",
  "value": function() {
    console.log('clicked');
  }
}, {
  "name": "Skiba",
  "value": function() {
    console.log('clicked');
  }
}, {
  "name": "Flashspan",
  "value": function() {
    console.log('clicked');
  }
}, {
  "name": "Roomm",
  "value": function() {
    console.log('clicked');
  }
}, {
  "name": "Gabspot",
  "value": function() {
    console.log('clicked');
  }
}];

let menu = fcm;

// initialize menu
menu.init(menuItems);

// add new menu element
menu.add('new menu item', function() {
    console.log('new menu item');
});

// stop menu
menu.stop();

Contributing

  1. Fork it
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin feature/my-new-feature
  5. Submit a pull request

License

MIT

About

Simple cli menu with fuzzy filtering

Resources

License

Stars

Watchers

Forks

Packages

No packages published