code: function mergeCommands(commands) {
    const cmds = filterCommands(commands);
    if (cmds.length === 0) {
      throw new Error('Expected at least one non-empty command');
    } else if (cmds.length === 1) {
      return cmds[0];
    } else {
      // Quote the arguments in each command and join them all using &&.
      const script = cmds.map(quote).join(' && ');
      return ['/bin/sh', '-c', script];
    }
  }
docs: Render zero or more commands as a single command for a Unix environment.
  In this context, a "command" is a list of arguments. An empty list or falsy value is ommitted.
  
  @param {string[][]} many commands to merge.
  @return {string[]} a single list of words.