docs: function smartSpinner(cbk, spinners = ['dots']) {//{{{
  
      var messageCbk;
  
      var stopped = false;
      let frame = 0;
      let spinner = 0;
      let next;
      let is_tty = tty.isatty(process.stdout.fd);
  
  
      function showNextFrame () {//{{{
          const frames = cliSpinners[spinners[spinner]].frames;
          logUpdate(frames[frame++ % frames.length] + ' ' + messageCbk(true));
      };//}}}
  
      function ctrlAPI(stop, newCbk) {//{{{
  
          // Ignore calls after spinning finished:
          if (stopped) return false;
  
          // Make stop parameter optinal:
          if ("boolean" != typeof stop) {
              newCbk = stop;
              stop = undefined;
          };
  
          // Message string/callback updating operation:
          if (newCbk !== undefined) {
              // Accept callback or literal string:
              messageCbk = ("function" == typeof newCbk)
                  ? newCbk
                  : ()=>newCbk
              ;
              if (! is_tty) {
                  if (stop !== undefined) {
                      stop || process.stdout.write("\n");
                  } else {
                      console.log(symbols.arrow + ' ' + messageCbk(false));
                  };
              };
          };
  
          // Handle Stopping operation:
          if (stop !== undefined) {
              clearInterval(next);
              stopped = true;
  
              let s = symbols[stop ? "ok" : "error"];
              logUpdate(s + ' ' + messageCbk(true));
  
              if (is_tty) process.stdout.write("\n");
          }
  
          return true; // Success.
  
      };//}}}
  
      ctrlAPI(cbk);
  
  
      if (is_tty) {
          
          if (spinners == "demo") {
              messageCbk = (function(cbk0){
                  return x=>("["+spinners[spinner]+"] "+cbk0(x));
              })(messageCbk);
              spinners = "all";
          };
  
          if (spinners == "all") {
              spinners = Object.keys(cliSpinners);
          } else if (typeof spinners == 'string') {
              spinners = [spinners];
  
          };
  
  
          const showNextSpinner = () => {
              if (next) {
                  clearInterval(next);
                  spinner++;
              }
  
              if (spinner >= spinners.length) spinner = 0; // Loop.
  
              const s = cliSpinners[spinners[spinner]];
  
              if (! stopped) { next = setInterval(showNextFrame, s.interval);
                  setTimeout(showNextSpinner, Math.max(s.interval * s.frames.length, 1000));
              };
          };
  
          showNextSpinner();
  
      };
  
      return ctrlAPI;
      
  }