Bug#733815: Modules completion takes a very long time

2014-01-02 Thread auil
when I switched out the sort|uniq -u and put in sort -u, it no longer worked. Sorry, I made a mistake. The pipe sort | uniq is equivalent to sort -u. However, you use uniq -u, which differs from uniq without options :-) i.e. check it out.. the above should give you the same number of

Bug#733815: Modules completion takes a very long time

2014-01-01 Thread Linda Walsh
a...@usp.br wrote: Thanks for your message. I find it useful to have modprobe default to listing only modules that are NOT loaded yet. For the default use, when loading a module, this is the case. Another issue is that some filenames have '-' in them, but the module names have '_' in

Bug#733815: Modules completion takes a very long time

2014-01-01 Thread auil
Another issue is that some filenames have '-' in them, but the module names have '_' in them. This is a problem because the modules filenames are a mess. Some filenames have an underscore '_' too. Does the current solution filter out duplicates due to the modulename and filename not

Bug#733815: Modules completion takes a very long time

2014-01-01 Thread Linda Walsh
a...@usp.br wrote: Another issue is that some filenames have '-' in them, but the module names have '_' in them. This is a problem because the modules filenames are a mess. Some filenames have an underscore '_' too. If you want to get (all available mods) minus (already loaded

Bug#733815: Modules completion takes a very long time

2013-12-31 Thread auil
Package: bash-completion Version: 1:2.0-1 Problem: The modules completion is performed by this function _modules() { local modpath modpath=/lib/modules/$1 COMPREPLY=( $( compgen -W $( command ls -RL $modpath 2/dev/null | \ sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' ) -- $cur

Bug#733815: Modules completion takes a very long time

2013-12-31 Thread Linda Walsh
This is related to this bug, but more, this bug reminded me. I wrote a completion routine for 'modprobe' that, in the module list, only shows you the modules you have not loaded yet. I know it is _possible_ to load an already-loaded module, again, but in my own use, that's usually not the case

Bug#733815: Modules completion takes a very long time

2013-12-31 Thread auil
Thanks for your message. I find it useful to have modprobe default to listing only modules that are NOT loaded yet. For the default use, when loading a module, this is the case. The command modprobe has also an -r option to unload the module, and in this case it would complete to the