Skip to content

Commit 9770123

Browse files
committed
feat(man): support zstd compressed man pages
1 parent 40aa4dc commit 9770123

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

completions/man

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _man()
55
local cur prev words cword split
66
_init_completion -s -n : || return
77

8-
local comprsuffix=".@([glx]z|bz2|lzma|Z)"
8+
local comprsuffix=".@([glx]z|bz2|lzma|Z|zst)"
99
local manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?($comprsuffix)"
1010
local mansect="@([0-9lnp]|[0-9][px]|3?(gl|pm))"
1111

13 Bytes
Binary file not shown.

test/t/test_man.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,11 @@ def test_delimited_deduplication(self, completion):
141141
# no completion, no space appended
142142
assert not completion
143143
assert not completion.endswith(" ")
144+
145+
@pytest.mark.complete(
146+
"man bash-completion-zstd-testcas",
147+
env=dict(MANPATH=manpath),
148+
require_cmd=True,
149+
)
150+
def test_zstd(self, completion):
151+
assert completion == "e"

0 commit comments

Comments
 (0)