scop / bash-completion

Programmable completion functions for bash
GNU General Public License v2.0
2.89k stars 380 forks source link

tipc completion error #59

Closed scop closed 8 years ago

scop commented 8 years ago

Just some random poking around tipc completion: tipc lin<TAB>ge<TAB>tol<TAB> gives tipc link get tolerance. Then hitting another tab there gives tipc link get tolerance link, and hitting another tab there spews an error:

error: No such file or directory
Unable to get TIPC nl family id (module loaded?)
error, message initialisation failed

This is on Fedora 23, non-root. @rical, could you have a look?

rical commented 8 years ago

This is sort of expected behavior, apart from maybe the error looking bad.

This is the synopsis: tipc link get { tolerance | priority | window } link TIPC-LINK-NAME

When you press the last tab for completing TIPC-LINK-NAME the bash-completion recipe tries to get the tipc link names using the tipc command, which fails as you don't have the TIPC module loaded on your system.

What I perhaps could do is implement a silent TIPC module check here, so that the last tab simply dons't output anything?

scop commented 8 years ago

Yes, the right thing to do is to just suppress the error message.

lequangdang commented 6 years ago

"modprobe tipc" will resolve the problem