Hi,

dear Bash Completion Maintainers, can you please check out the
attached bash completion (#537139)? I'm not a bash user and can't
judge whether that's the way to go or anything should be changed.

Should we add this to package initramfs-tools or would you mind
adding it to bash-completion?

thanks && regards,
-mika-

* Stephane Jourdois <kwis...@kwi.fr> [Mit Jul 15, 2009 at 02:28:31 +0200]:

> Please install the following as /etc/bash_completion.d/initramfs-tools
> to enable bash completion for update-initramfs :

> --------------------------------------------------
> # update-initramfs(8) completion
> # provided by Stéphane (kwisatz) Jourdois <steph...@jourdois.fr>

> _update_initramfs()
> {
>         local cur prev valid_options

>         cur=`_get_cword`
>         prev=${COMP_WORDS[COMP_CWORD-1]}

>       # The only option that takes an argument is -k
>         if [[ "$prev" == '-k' ]]; then
>               # Complete with kernel versions
>                 _kernel_versions
>                 return;
>         fi

>       # Complete with available options (obtained from -h)
>         valid_options=$( update-initramfs -h 2>&1 | \
>               sed -e '/^ -/!d;s/^ \(-\w\+\).*/\1/' )
>         COMPREPLY=( $( compgen -W "$valid_options" -- $cur ) )
> }
> complete -F _update_initramfs update-initramfs
> --------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to