Moving away from Remix I needed a way to quickly check the byte size of a smart contract in Solidity. Adding this to ~/.zshrc allows me to wrap a command around any input parameter.

function build() {
  BUFFER="solc --bin --overwrite $BUFFER -o ./tmp"
  zle accept-line
}

zle -N build

bindkey "^b" build

Update the current terminal session with source ~/.zshrc.

Now you can type ./MyContract.sol then press CTRL+B to get a success response or a stacktrace.