[Bug 1004225] Re: dramatic combination of apt-get and bash completion
Peter Cordes
peter at cordes.ca
Sun Nov 30 11:05:14 UTC 2014
I always scroll pages of completion results with space, not enter. I
didn't know enter was an option there. I just tried it, looks like
enter goes by lines, instead of pages? No wonder you were holding it
down. So... don't do that. esp. not on sudo.
To easily get a big list that you need to page, do
d[TAB]
There are a lot of commands that start with d, so you will get a nice big list. Or for an even bigger list:
nice [TAB] => all the commands
(the bash option to not tab-complete all the commands on an empty line
defaults to on, in Trusty at least, so that's why you need nice or sudo
or some other meta-command to trigger it.)
I don't think there's any point leaving the bug report open, so marking
it invalid.
I hope you were able to ^c your apt-get before much harm was done.
There should be logs somewhere in /var/log/apt/history of what got un-
installed. In case it's still relevant 2 years on...
** Changed in: bash-completion (Ubuntu)
Status: Opinion => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1004225
Title:
dramatic combination of apt-get and bash completion
Status in bash-completion package in Ubuntu:
Invalid
Bug description:
I don't know what to blame between apt-get, bash completion and
myself… I'm reporting this as a bug but it can also be seen as an open
question.
I wanted to install a python related package but was missing the exact
name when I was about to type it, thus I tried completion to list the
names of python packages:
sudo apt-get install python-[tab]
which nicely produces the list of python-* packages
scrolling the list a bit too far (using [enter]) it launched the command:
sudo apt-get install python-
resulting in the removal of python and a few hundreds of other
packages depending on python.
I know it's mostly based on a human mistake (I should have thought
about the package name before…), but the result is pretty dramatic and
I wonder if something could be done to prevent this?
Maybe scrolling in completion shouldn't use [enter] but arrows or
[space]
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1004225/+subscriptions
More information about the foundations-bugs
mailing list