diff --git a/dvc/command/ls/__init__.py b/dvc/command/ls/__init__.py index a44877f03..1b2317c6f 100644 --- a/dvc/command/ls/__init__.py +++ b/dvc/command/ls/__init__.py @@ -54,6 +54,7 @@ def add_parser(subparsers, parent_parser): ) list_parser = subparsers.add_parser( "list", + aliases=["ls"], parents=[parent_parser], description=append_doc_link(LIST_HELP, "list"), help=LIST_HELP, diff --git a/tests/unit/command/ls/test_ls.py b/tests/unit/command/ls/test_ls.py index c690d0ff5..7e7970c01 100644 --- a/tests/unit/command/ls/test_ls.py +++ b/tests/unit/command/ls/test_ls.py @@ -109,3 +109,8 @@ def test_show_colors(mocker, capsys, monkeypatch): "\x1b[01;34msrc\x1b[0m", "\x1b[01;32mrun.sh\x1b[0m", ] + + +def test_list_alias(): + cli_args = parse_args(["ls", "local_dir"]) + assert cli_args.func == CmdList