Coder Social home page Coder Social logo

inquirer-path's People

Contributors

aam229 avatar amassonneau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inquirer-path's Issues

Feature request: ctrl-a, ctrl-e, ctrl-w, ctrl-u

There are some common commands in bash and zsh that would be nice additions, e.g.
ctrl-a: move cursor to beginning of prompt
ctrl-e: move cursor to end of prompt
ctrl-w: delete the word immediately preceding the cursor
ctrl-u: delete the entire line to the left of the cursor

There are many others, but these are the ones I'm familiar with.. one wrinkle is that I think users can customize the shortcuts to access these commands :\

babel-runtime dependency error

Trying to use it, I get:

$ babel-node index.js
module.js:474
    throw err;
    ^

Error: Cannot find module 'babel-runtime/core-js/object/keys'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.require (module.js:500:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/kristianmandrup/repos/generators/master-inquisitor/node_modules/inquirer-path/lib/PathPrompt.js:3:13)

When I look at the file node_modules/inquirer-path/lib/PathPrompt.js
Indeed, I don't have babel-runtime in my project. I think your compilation surely should output ES5 files that are not reliant on babel runtime.

'use strict';

var _keys = require('babel-runtime/core-js/object/keys');

var _keys2 = _interopRequireDefault(_keys);

var _assign = require('babel-runtime/core-js/object/assign');

var _assign2 = _interopRequireDefault(_assign);

var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');

var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

When default path is file, the directoryOnly = false is not work

In PathAutocomplete.js line 21

if (!this.cwd.isExistingDirectory()) { throw new Error(The provided working directory ${cwd} does not exist or is not a directory.); }

then, the directoryOnly is meaningless; It should be:

if (!this.cwd.isExistingDirectory() && directoryOnly) { throw new Error(The provided working directory ${cwd} does not exist or is not a directory.); }

Appears dysfunctional on Windows

In this example, only the second line should query for a file, the fourth line is an anomaly not entered within the code. Whilst typing in, the third entry defaulted to containing the answer to the previous query, and when backspaced that still led to an invalid answer to the third query.

Configuration:

{
  type: 'path',
  name: 'file',
  message: 'Which file would you like to parse?',
  default: process.cwd(),
  validate: (path) => {
    if (fs.existsSync(path)) return true
    return console.log(' <-- this path does not exist or is inaccesible.')
  },
  multi: false
}

how does it work?

I installed the babelruntime and I got this plugin working.
However, when I start inputting a path I dont get any suggestions.
When i press tab, it literally prints a tab charakter. So I wonder: how is this plugin different from a normal input?

Am I doing something wrong?

I use win7 64bit, ConEmu, node v8.1.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.