commandlineparser / commandlineparser/commandline

Options as Global Variables?

Open
#844 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I would like to be able to access Options. via methods, and effectively use them as global variables
e.g.

public static string OptionA = Options.OptionA;
public static string OptionB = Options.OptionB;

Is there any way to access the parsed options globally via methods, or do I need to copy them into global variables manually?

Thanks so much for the help!

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. First clarify whether the requested API should expose parsed options globally and how its lifetime and configuration should work; done would mean an agreed access pattern with coverage for the intended usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.