diff options
author | Clément Martinez <clementmartinezdev@gmail.com> | 2016-06-08 13:40:27 +0200 |
---|---|---|
committer | Clément Martinez <clementmartinezdev@gmail.com> | 2016-06-08 13:40:27 +0200 |
commit | c9b3220160e4be0ed457e79c848ae18a2ea32f77 (patch) | |
tree | 7d369069163d84062ee2e4ba940f62e667435e53 | |
parent | 10575d895d6f92f5b023d8be57589139f6d1d841 (diff) |
Add modinfo completions
-rw-r--r-- | share/completions/modinfo.fish | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/share/completions/modinfo.fish b/share/completions/modinfo.fish new file mode 100644 index 00000000..2d034d05 --- /dev/null +++ b/share/completions/modinfo.fish @@ -0,0 +1,16 @@ +function __fish_print_modules + find /lib/modules/(uname -r)/{kernel,misc} -type f 2>/dev/null | sed -e 's$/.*/\([^/.]*\).*$\1$' +end + +complete -c modinfo -a "(__fish_print_modules)" +complete -c modinfo -l author -s a -d "Print only 'author'" +complete -c modinfo -l description -s d -d "Print only 'description'" +complete -c modinfo -l license -s l -d "Print only 'license'" +complete -c modinfo -l parameters -s p -d "Print only 'parm'" +complete -c modinfo -l filename -s n -d "Print only 'filename'" +complete -c modinfo -l null -s 0 -d "Use \\0 instead of \\n" +complete -c modinfo -l field -s F -x -d "Print only provided FIELD" -a "author description license parm depends alias intree vermagic vermagic" +complete -c modinfo -l set-version -s k -x -d "Use VERSION instead of `uname -r`" +complete -c modinfo -l basedir -s b -r -d "Use DIR as filesystem root for /lib/modules" +complete -c modinfo -l version -s V -d "Show version" +complete -c modinfo -l help -s h -d "Show help" |