How does bash tab completion work?

后端 未结 2 703
梦如初夏
梦如初夏 2020-11-29 16:14

I have been spending a lot of time in the shell lately and I\'m wondering how the tab autocomplete works. What\'s the mechanism behind it? How does the bash know the conte

2条回答
  •  情话喂你
    2020-11-29 16:45

    If you are interested in the basics: Bash uses readline which features history and basic completion. You could inspect the source if you want to get a detailed understanding. Furthermore, you can use readline to build your own CLI interfaces with completion

提交回复
热议问题