aptpac icon indicating copy to clipboard operation
aptpac copied to clipboard

Add bash completions

Open Jai-JAP opened this issue 2 years ago • 3 comments

Add bash completions for aptpac so that commands an be auto completed using <tab><tab>. I am not sure but the bash completions file of apt may help a lot here. Also I may try doing this if I get a chance.

Jai-JAP avatar Apr 28 '22 09:04 Jai-JAP

Notes:

  • https://iridakos.com/programming/2018/03/01/bash-programmable-completion-tutorial
  • https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion-Builtins.html#Programmable-Completion-Builtins

Itai-Nelken avatar May 19 '22 18:05 Itai-Nelken

I got an idea how to easily accomplish this. Just take a look on Pacman bash completion file https://gitlab.archlinux.org/pacman/pacman/-/blob/master/scripts/completion/bash_completion.in

Jai-JAP avatar Apr 02 '23 09:04 Jai-JAP

@Itai-Nelken here is the first version of bash completion. Working well based on preliminary testing.

aptpac.bash.txt

Jai-JAP avatar Apr 03 '23 18:04 Jai-JAP