fix(Man): completion on Mac

Problem:
`man -w` does not work on recent versions of MacOs.

Solution:
Make it so an empty result is interpreted as an error unless silent=true
This commit is contained in:
Lewis Russell
2024-12-13 14:22:59 +00:00
committed by Lewis Russell
parent b5c0290803
commit 47f2769b46
3 changed files with 27 additions and 3 deletions

View File

@@ -263,4 +263,14 @@ describe(':Man', function()
{ '1', 'other_man' },
}, get_search_history('other_man(1)'))
end)
it('can complete', function()
t.skip(t.is_os('mac') and t.is_arch('x86_64'), 'not supported on intel mac')
eq(
true,
exec_lua(function()
return #require('man').man_complete('f', 'Man g') > 0
end)
)
end)
end)