From 649d87c8cb45fdcd1fe39560b04a1dd22c417bbb Mon Sep 17 00:00:00 2001 From: Andrey Borzenkov Date: Sun, 12 Aug 2007 09:04:52 +0000 Subject: [PATCH] 23751: complete module files too --- ChangeLog | 5 +++++ Completion/Linux/Command/_modutils | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e4a3db860..c467050e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-08-12 Andrey Borzenkov + + * 23751: Completion/Linux/Command/_modutils: support for + completing module files directly + 2007-08-09 Clint Adams * Nikolai Weibull: 23749: Completion/Unix/Command/_cdrdao: diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils index d8c0e37e8..cc7034f8c 100644 --- a/Completion/Linux/Command/_modutils +++ b/Completion/Linux/Command/_modutils @@ -74,7 +74,11 @@ case "$state" in all_modules) modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%%.*} ) - _wanted modules expl module compadd -a modules && return + _tags files modules + while _tags; do + _requested files expl "module file" _files && ret=0 + _requested modules expl module compadd -a modules && ret=0 + done ;; params)