Re: Installing multiple packages at once

2013-09-22 Thread Ludovic Courtès
Nikita Karetnikov nik...@karetnikov.org skribis:

 Someone on IRC said that they would prefer to write ‘-i foo bar baz’
 instead of ‘-i foo -i bar -i baz’.  Should we change this or allow both
 variants?  And how hard would it be?

Currently -i takes an argument, hence this syntax.

What would be the syntax?  Remember we want to allow users to both
install and remove packages in a single transaction, as in:

  guix package -r bigloo -r hop -i guile -i racket

We could imagine something like:

  guix package -r bigloo hop -i guile racket

but I don’t think SRFI-37 allows us to know that ‘bigloo’ and ‘hop’
occurred after ‘-r’ whereas the others occurred after ‘-i’.  And I don’t
really like the syntax.

In short, while open to suggestions, I’m mostly in favor of the
status quo.  :-)

Ludo’.



Re: Installing multiple packages at once

2013-09-22 Thread Mark H Weaver
Nikita Karetnikov nik...@karetnikov.org writes:

 Someone on IRC said that they would prefer to write ‘-i foo bar baz’
 instead of ‘-i foo -i bar -i baz’.  Should we change this or allow both
 variants?  And how hard would it be?

You can do this:

  guix package --install={foo,bar,baz}

which the shell expands to the right thing before Guix is run.

Mark