Summary
The same (cli_name, argv) -> str default (cli_name.replace("_", "-")) is independently implemented in three different layers.
Details
lib/python/base_cli/context.py:36-37 (_default_history_display_command)
lib/python/base_cli/history.py:256-258 (display_command)
lib/python/base_cli/profile.py:141-142 (_generic_history_display_command)
Impact
A future change to the "generic" naming convention (e.g. handling additional separators) would need to be applied in three places and could silently drift if one is missed.
Suggested fix
Have context.py and profile.py import and reuse history.display_command (or extract one shared helper) instead of redefining it.
Summary
The same
(cli_name, argv) -> strdefault (cli_name.replace("_", "-")) is independently implemented in three different layers.Details
lib/python/base_cli/context.py:36-37(_default_history_display_command)lib/python/base_cli/history.py:256-258(display_command)lib/python/base_cli/profile.py:141-142(_generic_history_display_command)Impact
A future change to the "generic" naming convention (e.g. handling additional separators) would need to be applied in three places and could silently drift if one is missed.
Suggested fix
Have
context.pyandprofile.pyimport and reusehistory.display_command(or extract one shared helper) instead of redefining it.