mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 22:21:15 -03: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user