code: def compute_tab_title(self, vte):
          
          vte_title = vte.get_window_title() or _("Terminal")
          try:
              current_directory = vte.get_current_directory()
              if self.abbreviate and vte_title.endswith(current_directory):
                  parts = current_directory.split('/')
                  parts = [s[:1] for s in parts[:-1]] + [parts[-1]]
                  vte_title = vte_title[:len(vte_title) - len(current_directory)] + '/'.join(parts)
          except OSError:
              pass
          return TabNameUtils.shorten(vte_title, self.settings)
docs: Abbreviate and cut vte terminal title when necessary