AleMegadeth@eviltoast.org to linuxmemes@lemmy.world · 22 hours agosiempre lo hagoeviltoast.orgimagemessage-square154fedilinkarrow-up11.25Karrow-down112
arrow-up11.24Karrow-down1imagesiempre lo hagoeviltoast.orgAleMegadeth@eviltoast.org to linuxmemes@lemmy.world · 22 hours agomessage-square154fedilink
minus-squarebobo@lemmy.worldlinkfedilinkarrow-up1·edit-21 hour 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.