/bash_completion_lib/complete -o filenames/kldunload

http://github.com/brinkman83/bashrc · #! · 12 lines · 8 code · 4 blank · 0 comment · 0 complexity · 15f1854899327b89ea306dc330a3925c MD5 · raw file

  1. # FreeBSD kernel module commands
  2. comp_include _get_cword
  3. _kldunload()
  4. {
  5. local cur
  6. cur=`_get_cword`
  7. COMPREPLY=( $(kldstat | sed -ne "s/^.*[ \t]\+\($cur[a-z_]\+\).ko$/\1/p") )
  8. } # _kldunload()