On Sat 10 Sep 2005 at 14:09:15 +0200, you wrote:
> X-Loop: [EMAIL PROTECTED]
> Reply-To: Jan Christoph Ebersbach <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> X-Debian-PR-Message: report 327414
> X-Debian-PR-Package: bash
> X-Debian-PR-Keywords: patch
> In-Reply-To: <[EMAIL PROTECTED]>
> User-Agent: Mutt/1.5.10i
> Delivered-To: [EMAIL PROTECTED]
> X-Virus-Scanned: by amavisd-new at cs.tu-berlin.de (including spamassassin)
> X-Spam-Status: No, hits=0 tagged_above=0 required=3 tests=
> X-Spam-Level:
> Resent-From: Jan Christoph Ebersbach <[EMAIL PROTECTED]>
> Resent-To: [email protected]
> Resent-CC: Matthias Klose <[EMAIL PROTECTED]>
> Resent-Date: Sat, 10 Sep 2005 09:18:09 UTC
> Resent-Message-ID: <[EMAIL PROTECTED]>
> Resent-Sender: Debian BTS <[EMAIL PROTECTED]>
> From: Jan Christoph Ebersbach <[EMAIL PROTECTED]>
> To: Justin Pryzby <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Bug#327414: bash: no completion for invoke-rc.d
> Date: Sat, 10 Sep 2005 11:05:09 +0200
>
> On Sat 10-09-2005, Jan Christoph Ebersbach wrote:
>
> > On Fri 09-09-2005, Justin Pryzby wrote:
> >
> > > I agree! And it should work with sudo, too. Your patch doesn't
> > > implement /etc/init.d/$foo start,stop completion, correct?
> >
> > The start,stop completion should work with my patch.
> >
> > If the previous word is not invoke-rc.d, start, stop ... will be
> > completed.
> >
> > + *) COMPREPLY=( $( compgen -W 'start stop restart reload
> > + force-reload' -- $cur ) ) return 0 ;;
> >
>
> Ah, there is a bug - the find-parameter "-perm +u=x" should be "-perm
> +111"
>
> Here is the correct patch.
> --- bash_completion.old 2005-09-10 00:44:54.000000000 +0200
> +++ bash_completion 2005-09-10 10:58:44.000000000 +0200
> @@ -3238,6 +3238,32 @@
> } &&
> complete -F _mysqladmin mysqladmin
>
> +# invoke-rc.d(8) completion
> +#
> +have invoke-rc.d &&
> +_invokercd()
> +{
> + local cur prev options
> +
> + COMPREPLY=()
> + cur=${COMP_WORDS[COMP_CWORD]}
> + prev=${COMP_WORDS[COMP_CWORD-1]}
> +
> + case $prev in
> + invoke-rc.d)
> + files=$( find /etc/init.d/ -perm +111 | sed 's|^/etc/init.d/||' )
> + COMPREPLY=( $( compgen -W "${files}" -- $cur ) )
> + return 0
> + ;;
> +
> + *)
> + COMPREPLY=( $( compgen -W 'start stop restart reload force-reload'
> -- $cur ) )
> + return 0
> + ;;
> + esac
> +} &&
> +complete -F _invokercd invoke-rc.d
> +
> # gzip(1) completion
> #
> have gzip &&
Added for next release.
Ian
--
Ian Macdonald | "It's God. No, not Richard Stallman, or
[EMAIL PROTECTED] | Linus Torvalds, but God." (By Matt Welsh)
http://www.caliban.org/ |
|
|
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]