Azure / Azure/autorest.powershell

Feature request: Provide a way to alias commands in bulk

Open
#769 2 comments 0 reactions 0 assignees View on GitHub
feature-request P2
Dominant language
C#
Stars
123
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Currently, one can only alias commands one at a time by selecting a command's verb and/or subject, see https://github.com/Azure/autorest.powershell/blob/master/docs/directives.md#cmdlet-aliasing.

### Proposal
#### Option 1
Allow `alias:` have access to the match group of a `subject:` e.g.:
``` yml
- where:
subject: (.*)(WindowsUpdates)(.*)
set:
alias: ${verb}-Mg$1WU$3
```
#### Option 2
Add a rename directive for alias e.g.
``` yml
- where:
alias: Get-(.*)WindowsUpdates(.*)
set:
alias: Get-$1WU$3
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.