fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
ce245704d
master
1function __fish_list_loaded_klds 2set -l klds( kldstat | string match -r'\b\S+.ko$' ) 3for kldin $klds 4if set -l description( __fish_whatis ( string replace'.ko' '' --$kld ) "kernel module" ) 5printf '%s\t%s\n' $kld $description 6else 7printf '%s\n' $kld 8end 9end 10end 11 12complete -c kldunload -xa'(__fish_list_loaded_klds)'