when doing `yay -S foo bar` where `bar` is a makedep of `foo` in rare
cases bar would be listed as [aur make] even thought it was explicitly
requested.
Previosuly when reading from stdin we did not redirect back to the real
stdin afterwards so it was imposible to interact with y/n questions.
Now redirect back to "/dev/tty" just like pacman does.
A while ago the url to download a pkgbuild was using pkg.Name(), it was
latter changed to pkg.Base() to support split packages. It seems that
pkg.Base() does not work for non split packages for some reason.
So instead try pkg.Base() and if it is empty default to pkg.Name().
Also add support for downloading from multilib
commit 5286f385 broke the alignment on -> in the upgrade menu.
This commit moves the function responsable for printing the upgrade menu
from upgrade.go to print.go, fixes the formating to how it was before
and changes the padding on the number to three digits instead of two.
This allows proper alignment on numbers >100 which is not unheard of.
With the planned move to number menus for askcleanbuilds and
askeditpkgbuilds a consistant way is needed to make number menus in
a clean way without rewriting the same code over and over.
The prevous commit introduced `parseNumerMenu()` to create a standard
way to handle number menus. This commit implements the new function for
the upgrade menu both as a test and to bring some new features.
Entering 1-9999999 will no longer cause ram usage to spike to 100%
(before yay would try to build an []int containing the numbers 1 to
9999999).
Suport for discarding/including entire repos by name
> "54 aur extra"
would skip the package numbered 54 and all packages
that are listed as aur and extra.
> "^devel ^20"
would only install packages listed under devel and the package
numbered 20
With this The user should never have to manually edit the yay config
file. All options can be set directly through yay using
`yay --<option> <value> --save`
Use cacheHome for builddir instead of hardcoding ~/.cache
Use the command names in config.*Bin options.
For example PacmanBin is changed to just "pacman" this means yay will
call the pacman commit in PATH. If the user wants to use a different
binary they can still specify a full path in the config.
Before setting options such as --topdown would be saved to the config
file automaticly when used. Now this is no longer done by default and
isntead the --save flag must be passed for this to happen.
If --save is passed the config is now saved as soon as the argument
parsing is finished apposed to before where it was saved when yay exits.
This means that config changes will now apply if the user does a ^C
before yay finishes.