dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.63k stars 278 forks source link

How can I stop vorpal from adding quotes to string ? #307

Open Loooooouuuuu opened 6 years ago

Loooooouuuuu commented 6 years ago

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 !

b4dnewz commented 6 years ago

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.

huan commented 4 years ago

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...