You are not logged in.
And I mean to answer this particular question with "2":
:: There are x available providers for y
:: Repository extra
1) option_1 2) option_2
Enter a number (default=1):
I need it for a script.
Offline
Install option_2 with 'pacman -Syu option_2'.
Offline
Karol, you'd need to know what the options were in advance to do that. While it's likely this will work for the OP, a more general answer that gets at the question as asked:
echo 2 | pacman -S <option>
Althought this method assumes both that the *correct* answer will always remain 2 forever, and more importantly that there will always be a question asked needing input. If the two packages are merged, or one is removed from the repos, then suddenly that input of '2' might go for the next question of whether you want to continue [Y/n] (in which case it would be treated as a 'no'.)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline