code: public static void popShell() {
  
          ArrayList<CmsShell> shells = SHELL_STACK.get();
          if (shells.size() > 0) {
              shells.remove(shells.size() - 1);
          }
  
      }
docs: Removes top of thread-local shell stack.