-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Rework completion #584
Rework completion #584
Conversation
|
I've already got more commits on the way but I'll make this one the last one for this release. |
Getting a name for that is a bit of a pain. A few alternatives I don't like as much as the present option:
|
|
Also because there is now only one completion cache and it how has the fish format, the current aur_sh cache will need to be refreshed to get the proper formatting. There's a couple solutions I see.
|
aur_sh is actually a non descriptive name because it contains both repo and aur pkgs, I would move it to sh.cache and deprecate all others |
Good point, didn't think of that. |
56f67fe
to
14e4a33
Compare
Bash seperates on whitespace, so the fish completion file actually works for bash and zsh. So remove the concept of shells entirley and just use the singular aur_sh.cache file. If for some reason output without the repository data is needed, the user could always just pipe it into awk like so `yay -Pc | awk '{print $1}'`. Or perhaps a --quiet option could be added where yay will strip the output itself. The completion cache now updates when installing AUR packages. This is done as a goroutine with no wait groups. This ensures the program will never hang if there is a problem. The completion is stil updated during -Pc but as long as an AUR package has been installed recently it should not need to update. The cache will now also wait 7 days instead of 2 before refreshing. A refresh can be forced using -Pcc.
The default setting is 7 days. The user can specify a different time in days. -1 can be set to never refresh while 0 can be used to always refresh.
14e4a33
to
bc60283
Compare
Bash seperates on whitespace, so the fish completion file
actually works for bash and zsh. So remove the concept of shells
entirley and just use the singular aur_sh.cache file.
If for some reason output without the repository data is needed, the
user could always just pipe it into awk like so
yay -Pc | awk '{print $1}'
. Or perhaps a --quiet option could be addedwhere yay will strip the output itself.
The completion cache now updates when installing AUR packages. This is
done as a goroutine with no wait groups. This ensures the program will
never hang if there is a problem.
The completion is stil updated during -Pc but as long as an AUR package
has been installed recently it should not need to update.
The cache will now also wait 7 days instead of 2 before refreshing.
A refresh can be forced using -Pcc.
Make the completion refresh time configurable
The default setting is 7 days. The user can specify a different time in
days. -1 can be set to never refresh while 0 can be used to always
refresh.
Alternative to #539