question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No single flag support?

See original GitHub issue

I see there’s alias support, but this behavior below is kind of unexpected. Would love to know what others think here. Shouldn’t minimist and dargs be inter-operable?

console.log(process.argv.slice(2))
console.log(minimist(process.argv.slice(2)))
console.log(dargs(minimist(process.argv.slice(2))))
console.log(minimist(dargs(minimist(process.argv.slice(2)))))
[ 'list', '--animal', 'meow', '-A', '-L', '-P', '-H', '-A' ]
{ _: [ 'list' ],
  animal: 'meow',
  A: true,
  L: true,
  P: true,
  H: true }
[ '--animal=meow', '---a', '---l', '---p', '---h', 'list' ]
{ _: [],
  animal: 'meow',
  '-a': true,
  '-l': true,
  '-p': true,
  '-h': 'list' }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
reggicommented, Jun 26, 2016

Hey @sindresorhus, thanks for the quick reply.

I’m proxying some bash commands and I need to parse using minimist and then pass the parent commands along to a child process again.

There are a couple of other options I found that follow minimist. Feel free to close.

0reactions
tunnckoCorecommented, Jun 17, 2019

@sindresorhus, probably behind some option e.g. allowSingleFlags? Otherwise it sounds like a breaking change. Because most of the tests are failing. Which is normal - e.g. { a: 123 } now becomes ['-a=123'].

Read more comments on GitHub >

github_iconTop Results From Across the Web

no one fights alone flag - Amazon.com
No One Fights Alone Flag 3x5 ft American Flag Garden Flags Thin Line Flag For Supporting Nurse Police Military Firefighters Home Room Garden...
Read more >
Single Family Housing Programs - USDA Rural Development
Purchase or build with no money down in eligible rural areas · Low or Very-Low Income · Typically 33-year term with payment assistance...
Read more >
Find your lost AirPods - Apple Support
There is no other Apple service that can find, track, or otherwise flag your device for you. To find your AirPods, you need...
Read more >
American Flag Display FAQ | The American Legion
Can a flag that has covered a casket be displayed after its original use? There are no provisions in the Flag Code to...
Read more >
Flag code FAQs: Displaying the flag - USHistory.org
In military use, no more than two flags may be on a single pole. ... the Flag Code does not support those who...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found