Should the CLI support user default setting values
See original GitHub issueWorking with a Razor Pages app. Having to type the namespace value over and over when adding a new page to the application.
> dotnet new page --name Index -na MyAppName.Pages.Area -o Pages/Area
> dotnet new page --name NextPage -na MyAppName.Pages.Area -o Pages/Area
Solved with creating local variable
> ns=-ns=MyAppName.Pages
> dotnet new page --name Index $ns.Area -o Pages/Area
The Azure CLI offers user defaults once set the user does not have to specify them in the actual command at all.
az configure --defaults location="East US" group="mysuperappgroup"
[defaults]
location = East US
group = mysuperappgroup
# create a web application usually needing the above location and group specified.
az appservice web create -n myapp
It would suffice that the dotnet application should support this feature for things like --framework
, --language
, --nuget-source
etc. without having to have the developer script specifically via bash, powershell or some other means.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Configuring the CLI
The CLI supports using a file for CLI-specific configurations. You can: Specify a default profile. Set default values for command options so ...
Read more >Environment variables to configure the AWS CLI
Environment variables provide another way to specify configuration options and credentials, and can be useful for scripting or temporarily setting a named ...
Read more >Azure CLI configuration options
The Azure CLI allows for user configuration for settings such as logging, data collection, and default argument values. The CLI offers a ...
Read more >Configuration and Control CLI Commands
Use the following CLI commands for configuration and control. ... The default is 8443. n must be a value in the range of...
Read more >Cisco Identity Services Engine CLI Reference Guide ...
CLI configuration commands can have a default form, which returns the command settings to the default values. Most commands disable by ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In
.gitconfig
we can define aliases like:docs: https://git-scm.com/docs/git-config
with usage:
git dnc myConsoleApp
. This works across the platforms/shells (as git installer itself packs unix shell in Windows for cmd/powershell usage)..dotnetconfig
or.netconfig
with [alias] support would be a great match!@KathleenDollard @nguerrera another application for
dotnet config