FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 06-08-2010, 12:42 PM
Michael Prokop
 
Default Bug#537139: initramfs-tools: please include update-initramfs bash completion

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 <kwisatz@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 <stephane@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
> --------------------------------------------------
 

Thread Tools




All times are GMT. The time now is 12:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org