shell: Use "--has-foreground" option with "gear install".

This will be made optional as part of #781.