"Thompson, David" <dthomps...@worcester.edu> skribis: > I disagree, and here's why. Going back to the sudo/ssh example, it's > not possible to do 'cd /bar; frob' naively because this... > > sudo cd /bar; frob > > ...is two commands. And this doesn't work either because it's not a > valid string for exec: > > sudo 'cd /bar; frob' > > However, we can just do the 'sh -c' trick! > > sudo sh -c 'cd /bar; frob' > > This is essentially what you propose having built-in, but I think it > would be best to leave it out. That way we can simply use 'system*' > and users that want to execute an inline Bash script can do so using > the method they most likely already know about from tools like sudo > and ssh. > > guix environment --ad-hoc guile -- guile -c '(frob)' > > guix environment --ad-hoc guile -- sh -c "cd bar/; guile -c '(frob)'" > > This has the additional advantage that the first process created > inside containers will be PID 1, not 2. > > Does this counter-proposal sound OK?
Yes it does; you win. ;-) I guess we must still support -E for compatibility. Probably it should do an implicit ‘sh -c’? Thanks, Ludo’.