/bash_completion_lib/complete/rmmod
http://github.com/brinkman83/bashrc · #! · 18 lines · 12 code · 6 blank · 0 comment · 0 complexity · 76c4f69a62891851e7c388e5d25a0bb9 MD5 · raw file
- # Linux rmmod(8) completion. This completes on a list of all currently
- # installed kernel modules.
- comp_include _get_cword
- _rmmod()
- {
- local cur
- COMPREPLY=()
- cur=`_get_cword`
- COMPREPLY=( $( /sbin/lsmod | \
- awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null ))
- return 0
- } # _rmmod()