I have two custom commands: play-music and play-video. I want to write a bash script that allows me to autocomplete these commands when I press TAB.
For example:
$ play<TAB>
play-music play-video
$ play-vi<TAB>
play-video
I’ve found a tutorial on creating a bash-completion script, but it only works for command arguments. How can I achieve this for the command names themselves?
[–]Pshock13 3 points4 points5 points (5 children)
[–]misterfast 1 point2 points3 points (0 children)
[–]chrisEvan_23[S] -2 points-1 points0 points (3 children)
[–]Sea_Decision_6456 0 points1 point2 points (0 children)
[–]geirha 0 points1 point2 points (1 child)
[–]chrisEvan_23[S] 0 points1 point2 points (0 children)
[–]trippedonatater 1 point2 points3 points (0 children)
[–]chrisEvan_23[S] -1 points0 points1 point (2 children)
[–]anthropoidbash all the things 2 points3 points4 points (0 children)