Artificial intelligent assistant

Installing Composer dependency manager and running it right afterwards I install Composer the PHP dependency manager and run it right afterwards this way on Ubuntu 18.04 with Bash: curl -sS -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer composer A **two line** alternative will include `composer` in the second line,with `&&` or `;` like: curl -sS -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer && composer But I must say that by principle, I'm quite reluctant to use **one liners** with `&&` or `;`. Maybe I should just change an attitude, maybe not. Is there an argument like `--install-dir=/usr/local/bin` or `--filename=composer` to also run Composer directly when installation ends, thus redunding the need for `&&` or `;`?

> Is there an argument like `--install-dir=/usr/local/bin` or `--filename=composer` to also run Composer directly when installation ends, thus redunding the need for `&&` or `;`?

Running `./composer-setup.php --help` lists the supported options, and shows that there’s nothing to implement what you’re after.

There’s nothing wrong with running separate commands, that’s what shell scripts are for. There is however a difference between separate lines and `&&`, which is that `&&` ensures that `composer` is only run if the download and installation succeeded. You can achieve the same effect with `set -e` (which comes with a number of caveats in some environments, but nothing applicable to you as far as I know).

If you really want to minimise your command line, you can run


curl -sS | php -- --install-dir=/usr/local/bin --filename=composer && composer


but I always recommend keeping a copy of downloaded installers.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 94c80bc6d419654a0548bd0866b1a37f