Aliases can be made with the names of commands
Created by: BreD1810
Currently, you can set an alias with the same name as the command. The alias will not work, but it will be created anyways.
Instead, there should be an error shown to the user, similar to the GitHub CLI:
This could be fixed by checking if the alias name provided matches an existing command.
Steps to Reproduce
- Try to set an alias with the name of an existing command (e.g
glab alias set mr 'issue'
) - Command succeeds
- Try to use the alias (e.g
glab mr
) - Behaviour is of the original command and not the alias.
Your Environment
- Version used: Latest commit of trunk (5716ba6a)
- Operating System and version: Arch Linux, kernel 5.8.5