-
Notifications
You must be signed in to change notification settings - Fork 406
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
Mega auto-completion script taking very long to finish on Ubuntu 20.04 WSL #696
Comments
That's odd, such completion script should run in a timely manner. I wonder what's taking the time: the |
Quick Fix |
Instead of getting the list of all commands with The two are not exactly equivalent, but I think the second one is the correct one. For example |
I had the same problem and tested @Cnoor0171 fix. It wokrs like a charm. @polmr can we open a PR? |
As it is now, painfully slow (though not as bad as 40 seconds, but still noticable): As it could be: Please consider. ~# lsb_release -d |
it is extremely slow in Ubuntu 18.04, it is taking a couple of minutes, which is absurd. |
This is a lifesaver! Tested and works. Thanks! |
I installed mega-cmd from apt for Ubuntu 20.04 WSL. Wait time for opening a shell went from a few seconds to closer to a minute 😐
Opening a new shell sources
.bashrc
which sources the file/usr/share/bash-completion/bash_completion
, and during that the filemegacmd_completion.sh
is sourced from/etc/bash_completion.d
.To see what's taking so long during that I ran
Here's the output:
This is where it gets very slow. After closer to a minute, I get an output of a long list of for loops, this is just the very beginning:
It seems like some optimizing needs to be done here to allow
/etc/bash_completion.d/megacmd_completion.sh
to be sourced in a reasonable amount of time.As a temporary fix, I moved the file away from bash_completion.d:
sudo mv /etc/bash_completion.d/megacmd_completion.sh ~
. For my use case, that's fine since I only intend to use megacmd programmatically.The text was updated successfully, but these errors were encountered: