-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
There is desire to override the default behavior of a command with an alias. This enables the use of the CLI in a way where the behavior is consistent and reduces the number of options.
Use Case
I am developing a script which will be applied to various machines to process logs. I want to ensure that every time the encrypt process is used a default attribute is applied.
This could be done via scripting, but since new developers might not know about that script I'd prefer to pre-configure the CLI to always add this command.
Example
The GitHub CLI gh supports this via the alias subcommand.
Aliases can be used to make shortcuts for gh commands or to compose multiple commands.
Run `gh help alias set` to learn more.
USAGE
gh alias <command> [flags]
AVAILABLE COMMANDS
delete: Delete set aliases
import: Import aliases from a YAML file
list: List your aliases
set: Create a shortcut for a gh command
INHERITED FLAGS
--help Show help for command
LEARN MORE
Use `gh <command> <subcommand> --help` for more information about a command.
Read the manual at https://cli.github.com/manual
Learn about exit codes using `gh help exit-codes`Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request