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.

I know that now to parse need use aliases package (related #24).

One of my projects consists of scripts (about a hundred) to run in Continuous Integration.

I have to add the same lines in each file.

const aliases = require('aliases');

meow(help, { alias: aliases(help, {h: 'help'}) });

I think that we can add parseAliases option to simplify API.

const help = `
    Usage
      $ unicorn <name>

    Options
      -r, --rainbow  Lorem ipsum dolor sit amet
      -m, --magic    Aenean commodo ligula eget dolor
`;

meow(help, { parseAliases: true });

I’d really like to have this feature by default.

We can parse aliases if alias option is not specified. It won’t break backward compatibility.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:11
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sindresorhuscommented, Sep 29, 2017

I’ve come to the realization that it would be better to go the other way around. Generate CLI output from code definition. So closing this.

1reaction
blondcommented, Oct 11, 2016

Basic usability of the meow is that I can write help in human-readable format and do nothing more. Based on this philosophy need to parse not only arguments but also aliases.

I have invited several developers to use meow. Each of them asked me, “Why do we need to describe aliases twice?”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sindresorhus/aliases: Parse flag aliases in CLI help output
import aliases from 'aliases'; const help = ` Usage $ unicorn <name> Options -r, --rainbow Lorem ipsum dolor sit amet -m, --magic Aenean...
Read more >
Failed to parse aliases - Common causes and quick fixes
A detailed guide on how to resolve errors related to "Failed to parse aliases"
Read more >
When to resolve aliases while parsing? - java
I want to give the user an option to define custom aliases like alias com='command2 | command3' (bash style). Then the user should...
Read more >
Parse argument aliases in Deno
Using Deno's standard flags module to parse command-line arguments with aliases.
Read more >
Why are queries parsed in such a way that disallows ...
The MSDN docs say that the general logical parsing order is such that SELECT is parsed nearly last (thus resulting in "no such...
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