Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bash completion for Mint's implementation of apt #16

Open
ckristi opened this issue Jun 7, 2018 · 7 comments
Open

bash completion for Mint's implementation of apt #16

ckristi opened this issue Jun 7, 2018 · 7 comments

Comments

@ckristi
Copy link

ckristi commented Jun 7, 2018

In Mint, the apt command is implemented as a python wrapper under /usr/local/bin/apt (part of the mint-system package).

However, the bash completion config for Mint's apt, seems to be missing completion for 'apt list' for example. Removing the /etc/bash_completion.d/apt-linux-mint (also from mint-system package) allows /usr/share/bash-completion/completions/apt to be taken into consideration for the apt command (and 'apt list --upgradable' autocompletes nicely), but it may break some other functionalities/commands provided by the wrapper.

Could the two completion file configs be merged somehow?

Thank you,
Cristi

@mleo91
Copy link

mleo91 commented Jun 11, 2018

I can confirm the bug (linux mint 19 cinnamon 64 bit beta). I had to add the "autoremove" tag to line 50 of the "apt-linux-mint" file so I have suggestions when I run the command in question with "apt".

It seems that some options are missing inside the wrapper; I also wonder if its disabling can result in a loss of functionality in the system.

Thanks for your attention,
Marco

@DarthFudd
Copy link

I'm getting the same problem in Mint 18. At a Bash command prompt I type "apt li", and then hit tab a few times looking for autocompletion to fill in "apt list", but there's no response. Similarly, if I type "apt list --upgr" and hit tab a few times, there's no autocompletion to "apt list --upgradable". I get the same behavior if I switch to an interactive sudo shell with "sudo --login" or "sudo --shell".

I'm currently working around it by adding this line to my .bashrc file:

source /usr/share/bash-completion/completions/apt

So far this seems to work with no problems, but I have NOT tested the workaround extensively for unwanted side-effects.

@dimonic
Copy link

dimonic commented Dec 9, 2019

Also not getting completions for git, similar workaround works (

source /usr/share/bash-completion/completions/git

).

@x10an14
Copy link

x10an14 commented Jan 14, 2021

Still have this issue on Linux Mint 20.1

(And sourcing /usr/share/bash-completion/completions/apt doesn't work for me).

@matsonfamily
Copy link

yeah, i found that typing the bash built-in of source also worked (thanks to @DarthFudd above)... why in the heck was the really well written debian autocomplete (see the /usr/share/bash-completion/completions/ file) hacked up into a little tiny mint version? and who edits a file like this without providing a date and name explanation at the top? seems that someone just made a file to change the search keyword and then forgot to paste the rest in? or maybe the author thought they were additive?

@smurphos
Copy link

yeah

The file and it's commit history is here - https://github.com/linuxmint/mintsystem/blob/master/etc/bash_completion.d/apt-linux-mint

@hedenface
Copy link

Just to chime in, I'm on 20.1, and this works perfectly for me. Maybe it got fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants