vorpal-autocomplete-fs
File System autocompletion for Vorpal
Last updated 5 years ago by dthree .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install vorpal-autocomplete-fs 
SYNC missed versions from official npm registry.

Vorpal - File System Autocompletion

Build Status Coverage Status XO code style

An extension to Vorpal that provides File System-based tabbed autocompletion for a given command. This is an exact match of the autocomplete functionality provided in Unix commands like ls or cat.

Installation

npm install vorpal-autocomplete-fs
npm install vorpal

Getting Started

const vorpal = require('vorpal')();
const fsAutocomplete = require('vorpal-autocomplete-fs');

vorpal.delimiter('myapp$').show();

vorpal
  .command('cat [dirs...]')
  .autocomplete(fsAutocomplete());
$ node myapp.js
myapp$ cat [tab] [tab]
bin/  myapp.js  package.json  README.md
myapp~$ cat m [tab]
myapp~$ cat myapp.js

Only show directories

To omit files from the autocomplete and only show directories, pass in the directory option:

vorpal
  .command('cat [dirs...]')
  .autocomplete(fsAutocomplete({directory: true}));

License

MIT © David Caccavella

Current Tags

  • 0.0.3                                ...           latest (5 years ago)

3 Versions

  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 15
This Month 62
Last Day 0
Last Week 22
Last Month 30
Dependencies (2)
Dev Dependencies (13)

Copyright 2014 - 2016 © taobao.org |