dthree / vorpal

Node's framework for interactive CLIs

Home Page:http://vorpal.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I stop vorpal from adding quotes to string ?

Loooooouuuuu opened this issue · comments

commented

Hello ! I am trying to use vorpal to make a cli program for downloading video with youtube-dl. I'm trying to make a "yt" command : yt

  vorpal.command('yt <yt...>', '').action(function(args, callback) {
    this.log(args.yt.join(''));
    callback();
  });

If I use this command, I will get this result : https://www.youtube.com/watch?v='dQw4w9WgXcQ'

Why is vorpal adding quotes on both end of the YT's video ID ? Is there another way ?

Thanks for your help !

it's caused from an error in the regex that parse of the args string here, see the screenshot below:

image

I've opened a #321 with the fix.

I ran into this issue too, but unfortunately, the PR has been closed instead of being merged.

Would love to see it to be merged...