mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-04-01 01:15:14 +08:00
completions/man: offer file completions when appropriate
Suggest files to "man -l", but only if the "-l" option is supported (so not on BSD). Technically we should accept multiple files but this seems good enough. Also suggest files when the token-at-cursor contains a slash, because man will treat arguments as file paths if they contain a /.
This commit is contained in:
parent
475a2afc40
commit
cb5a3fd9a1
@ -34,3 +34,8 @@ complete -xc man -s p -d Preprocessors
|
||||
complete -c man -s t -d "Format for printing"
|
||||
complete -c man -s w -l path -d "Only print locations"
|
||||
complete -c man -s W -d "Only print locations"
|
||||
|
||||
complete -c man -n 'string match -q -- "*/*" (commandline -t | string collect)' --force-files
|
||||
if echo | MANPAGER=cat command man -l - &>/dev/null
|
||||
complete -c man -s l -l local-file -d "Local file" -r
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user