From 6dd5fc9cef8328342aca4e747cc3a8526706e7f5 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 3 Sep 2000 21:45:37 +0000 Subject: 12728: man -l / --local-file completes _files --- ChangeLog | 5 +++++ Completion/User/_man | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 55eb47b96..ca378bd37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-09-03 Clint Adams + + * 12728: Completion/User/_man: complete _files instead of + manpages if -l or --local-file is present on the commandline. + 2000-09-02 Bart Schaefer * 12725: Util/helpfiles: Recognize more end-of-page patterns, and diff --git a/Completion/User/_man b/Completion/User/_man index 2dae425ee..d96793e9c 100644 --- a/Completion/User/_man +++ b/Completion/User/_man @@ -4,6 +4,10 @@ setopt localoptions rcexpandparam local rep expl star approx mrd +if [[ $words[1] == man ]] && (( $words[(I)-l] + $words[(I)--local-file] )); then + _files || return 0 +fi + if [[ $compstate[pattern_match] != [^*] ]]; then # If a string other than *, we just want correction, so no `*'. star='*' -- cgit 1.4.1