docs: @Override
      public int searchBackwards(String searchTerm, int startIndex, boolean startsWith)
      {
          ListIterator<jline.console.history.History.Entry> it = this.getHistory().entries(startIndex);
          while (it.hasPrevious()) {
              jline.console.history.History.Entry e = it.previous();
              String itemNormalized = e.value().toString().toLowerCase();
              String termNormalized = searchTerm.toLowerCase();
              if (startsWith) {
                  if (itemNormalized.startsWith(termNormalized)) {
                      return e.index();
                  }
              }
              else {
                  if (itemNormalized.contains(termNormalized)) {
                      return e.index();
                  }
              }
          }
          return -1;
      }