Open Ignisor opened 5 years ago
The sudo apt install redis
being suggested is a result of the history
rule searching shell history and finding a similar command.
There's yet no such rule for APT. One that would suggest a correction for a mistyped package. Are you willing to contribute?
@scorphus Hi, newbie here. So will this work properly if apt-get was used instead?
Hey, @ebby21! Welcome aboard!
Yes, it should work for both apt
and apt-get
. The for_app
decorator can help with that (e.g. thefuck/rules/gradle_no_task.py).
I noticed that there are multiple rules for apt: apt_get, apt_get_search, apt_invalid_operation, apt_list_upgradable, apt_upgrade
Could you tell me which one corrects mistyped packages for apt-get?
Could you tell me which one corrects mistyped packages for apt-get?
None of them. That rule needs to be created. Hence this very issue 🙂
Hmm... Does CommandNotFound provide an api for this? If not, can I execute a system command to invoke the package manager (apt) to search for the package and return the closest match?
Hi, is this issue claimed or can I work on it? Newbie here. :smile:
I noticed this problem with apt-get
as well.
The output of
thefuck --version
(something likeThe Fuck 3.1 using Python 3.5.0 and Bash 4.4.12(1)-release
):The Fuck 3.29 using Python 3.6.8 and Bash 4.4.20(1)-release
Your system (Debian 7, ArchLinux, Windows, etc.): Linux Mint 19.2 Tina
How to reproduce the bug: So I was trying to install RabbitMQ, and I were too lazy to check the proper package name. So I decided to use the power of :zap: The Fuck :zap:
And it's pretty funny but it tried to install redis instead.
What I expect is:
$ sudo apt install rabbitmq-server
The output of The Fuck with
THEFUCK_DEBUG=true
exported (typically executeexport THEFUCK_DEBUG=true
in your shell before The Fuck):If the bug only appears with a specific application, the output of that application and its version:
Anything else you think is relevant: