Skip to content

Commit 18351d8

Browse files
authored
fix cmd.name to name
when add_command function has name and alias like _cmd.add_command(_other_cmd, "command", aliases=["cmd"]), aliases does not work.
1 parent 6a19226 commit 18351d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

click_aliases/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def add_command(self, *args, **kwargs):
2626

2727
self._commands[name] = aliases
2828
for alias in aliases:
29-
self._aliases[alias] = cmd.name
29+
self._aliases[alias] = name
3030

3131
def command(self, *args, **kwargs):
3232
aliases = kwargs.pop("aliases", [])

0 commit comments

Comments
 (0)