Re: [Bash-completion-devel] For the completion of modprobe could you add the following for the insert case?

2013-01-29 Thread Ville Skyttä
On 2013-01-29 12:51, Linda Walsh wrote: > It doesn't handle the "-r" case that you already had, but it does > remove already loaded modules from the list that is displayed. A different approach that should accomplish the same is now in git: http://anonscm.debian.org/gitweb/?p=bash-completion/bash-

[Bash-completion-devel] For the completion of modprobe could you add the following for the insert case?

2013-01-29 Thread Linda Walsh
It doesn't handle the "-r" case that you already had, but it does remove already loaded modules from the list that is displayed. #!/bin/bash function _clean_n_sort_mods { modprobe -l | sed -r 's!^.*/([^/]+)\.ko[ ]*$!\1! ' | sort } function _loaded_mods { lsmod |sed -r 's/ .*$//' }