Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

bash - How do you define the same autocomplete for multiple programs?

I have the following line in my ~/.bashrc.

complete -W '$(cat $HOME/.config/autocomplete.list1 $HOME/.config/autocomplete.list2)' stream

I wasn't to use the same for another program called streama and streamb. Is there a better way than typing the same definition two more times?

question from:https://stackoverflow.com/questions/65893014/how-do-you-define-the-same-autocomplete-for-multiple-programs

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Append streama streamb to your command.

See: help complete


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...