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.

First help screen for the CLI is misleading

See original GitHub issue

Information

  • OS: Windows
  • Version: 0.38.0
  • Terminal: Windows Terminal

Describe the bug If you just enter “TesstApp.exe” you get:

USAGE:
    AproClientConsole [OPTIONS] <COMMAND>

OPTIONS:
    -h, --help       Prints help information
    -v, --version    Prints version information
...<snip>

To Reproduce If you enter “TestApp.exe -h run” it does not display the help I wanted. But if I run “TestApp.exe run -h” the help is shown for the command - how could I have understood this from first screen?

Expected behavior If you enter "TestApp -h run " the help is displayed. Or change the description of first screen.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jeffward01commented, Oct 22, 2021

I second this, I think this is a good solution. The current implementation is misleading.

See my screenshot: image

  • My commands are ‘path’ and ‘.’
  • I can add options after the command to configure the command

The help screen shows this:

image

  • Options first --> Then Command

Proposed Solution:

USAGE:
    AproClientConsole [OPTIONS]
    AproClientConsole <COMMAND> [OPTIONS]

0reactions
NJ-Bradcommented, Oct 9, 2022

As a work around, I have created a function that addresses this situation

    private static string[] FixArgs(string[] asEntered)  
    {  
        List<string> newArgs = new List<string>(asEntered);  
        if ((newArgs[0].ToUpperInvariant() == "--HELP") ||  
            (newArgs[0].ToUpperInvariant() == "-H"))  
        {  
            newArgs.RemoveAt(0);  
            newArgs.Add("--help");  
        }  
        return newArgs.ToArray();  
    }  

I changed this statement app.Run(args); to app.Run(FixArgs(args));

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrong CLI
basically, I suspect the IN is faulty, because the display of calling party number is controlled by IN. In my experience I didn't...
Read more >
Troubleshoot AWS CLI errors - AWS Command Line Interface
General troubleshooting to try first. If you receive an error or encounter an issue with the AWS CLI, we suggest the following general...
Read more >
Command Line Interface Guidelines
An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day.
Read more >
The Help System - PowerShell
The first thing you need to know about the help system in PowerShell is how to use the Get-Help cmdlet. The following command...
Read more >
Command-line interface
A command-line interface (CLI) is a means of interacting with a device or computer program with commands from a user or client, and...
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