This looks smart
gem update `gem list | cut -d ' ' -f 1`From: [WayBack] How to Update All Your Ruby Gems At Once | Life, the Universe, and Everything
Though on the bash prompt, it works fine on Mac OS X / OS X / macOS / …, it does not work nice as an alias.
You can get it to work with difficult escaping (or nesting).
But it is easier to escape this:
gem update $(gem list | cut -d ' ' -f 1)
Escaped, it comes down to:
alias "gem-update-all=gem update \$(gem list | cut -d ' ' -f 1)"
Based on:
- [WayBack] Shell expansion: 3.4.5. Command substitution
- via [WayBack] escaping – Bash: Nested backticks in alias cause problems – Stack Overflow
–jeroen