File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,12 @@ def test_get_commands(monkeypatch, tmp_path):
147
147
result = tldr .get_commands (platforms = ["linux" ])
148
148
149
149
assert isinstance (result , list )
150
- assert "lspci (en) " in result
150
+ assert "lspci" in result
151
151
152
152
cache_zh = tmp_path / ".cache" / "tldr" / "pages.zh" / "linux"
153
153
Path .mkdir (cache_zh , parents = True )
154
154
Path .touch (cache_zh / "lspci.md" )
155
155
156
156
result = tldr .get_commands (platforms = ["linux" ], language = ["zh_CN" ])
157
157
158
- assert "lspci (zh) " in result
158
+ assert "lspci" in result
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ def get_commands(platforms: Optional[List[str]] = None,
401
401
path = get_cache_dir () / pages_dir / platform
402
402
if not path .exists ():
403
403
continue
404
- commands += [f"{ file .stem } ( { language } ) "
404
+ commands += [f"{ file .stem } "
405
405
for file in path .iterdir ()
406
406
if file .suffix == '.md' ]
407
407
return commands
@@ -654,10 +654,10 @@ def create_parser() -> ArgumentParser:
654
654
655
655
shtab .add_argument_to (parser , preamble = {
656
656
'bash' : r'''shtab_tldr_cmd_list(){{
657
- compgen -W "$("{py}" -m tldr --list | sed 's/[^[:alnum:]_]/ /g' )" -- "$1"
657
+ compgen -W "$("{py}" -m tldr --list)" -- "$1"
658
658
}}''' .format (py = sys .executable ),
659
659
'zsh' : r'''shtab_tldr_cmd_list(){{
660
- _describe 'command' "($("{py}" -m tldr --list | sed 's/[^[:alnum:]_]/ /g' ))"
660
+ _describe 'command' "($("{py}" -m tldr --list))"
661
661
}}''' .format (py = sys .executable )
662
662
})
663
663
You can’t perform that action at this time.
0 commit comments