pacman: support group selection delimited by commas
We support multiple arguments being comma separated elsewhere, so this seems like a natural extension to support in our multiparse selection code. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
ceb2362209
commit
c2fdc38b78
2 changed files with 5 additions and 5 deletions
|
@ -70,10 +70,10 @@ Operations
|
||||||
In addition to packages, groups can be specified as well. For example, if
|
In addition to packages, groups can be specified as well. For example, if
|
||||||
gnome is a defined package group, then `pacman -S gnome` will provide a
|
gnome is a defined package group, then `pacman -S gnome` will provide a
|
||||||
prompt allowing you to select which packages to install from a numbered list.
|
prompt allowing you to select which packages to install from a numbered list.
|
||||||
The package selection is specified using a space separated list of package
|
The package selection is specified using a space and/or comma separated list of
|
||||||
numbers. Sequential packages may be selected by specifying the first and last
|
package numbers. Sequential packages may be selected by specifying the first
|
||||||
package numbers separated by a hyphen (`-`). Excluding packages is achieved by
|
and last package numbers separated by a hyphen (`-`). Excluding packages is
|
||||||
prefixing a number or range of numbers with a caret (`^`).
|
achieved by prefixing a number or range of numbers with a caret (`^`).
|
||||||
+
|
+
|
||||||
Packages that provide other packages are also handled. For example, `pacman -S
|
Packages that provide other packages are also handled. For example, `pacman -S
|
||||||
foo` will first look for a foo package. If foo is not found, packages that
|
foo` will first look for a foo package. If foo is not found, packages that
|
||||||
|
|
|
@ -1304,7 +1304,7 @@ static int multiselect_parse(char *array, int count, char *response)
|
||||||
int start, end;
|
int start, end;
|
||||||
size_t len;
|
size_t len;
|
||||||
char *ends = NULL;
|
char *ends = NULL;
|
||||||
char *starts = strtok_r(str, " ", &saveptr);
|
char *starts = strtok_r(str, " ,", &saveptr);
|
||||||
|
|
||||||
if(starts == NULL) {
|
if(starts == NULL) {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue