Alejandro Mendoza@eviltoast.org to linuxmemes@lemmy.world · 3 days agosiempre lo hagoeviltoast.orgimagemessage-square203fedilinkarrow-up11.54Karrow-down117
arrow-up11.52Karrow-down1imagesiempre lo hagoeviltoast.orgAlejandro Mendoza@eviltoast.org to linuxmemes@lemmy.world · 3 days agomessage-square203fedilink
minus-squarebobo@lemmy.worldlinkfedilinkarrow-up2·edit-22 days agoBash will also do autocomplete for cli programs that have autocomplete functionality. Try typing: git r<tab><tab> you’ll see options for all the git commands that start with r. Often cli commands will have autocompletion for long (double dash) options. If you want to see all the commands that have auto complete available, look in: /usr/share/bash-completion/completions/ There’s a few other locations they can live, notably: /etc/bash_completion.d/ ~/.bash_completion ~/.local/share/bash-completion/completions/ I don’t know if there are more or if there is any variation per distro. You can also write your own bash completions. They can get pretty smart and context sensitive. Pretty good beginning tutorial: https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial edit - I should’ve mentioned that this isn’t native to bash, it requires installation of bash-completion. But bash-completion is installed by default in many distros.
Bash will also do autocomplete for cli programs that have autocomplete functionality. Try typing:
git r<tab><tab>
you’ll see options for all the git commands that start with r. Often cli commands will have autocompletion for long (double dash) options.
If you want to see all the commands that have auto complete available, look in:
/usr/share/bash-completion/completions/
There’s a few other locations they can live, notably:
/etc/bash_completion.d/ ~/.bash_completion ~/.local/share/bash-completion/completions/
I don’t know if there are more or if there is any variation per distro.
You can also write your own bash completions. They can get pretty smart and context sensitive.
Pretty good beginning tutorial:
https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial
edit - I should’ve mentioned that this isn’t native to bash, it requires installation of bash-completion. But bash-completion is installed by default in many distros.