From e309e54002efcf06f9c6210ad011a7664a2e1e0c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 1 Nov 2022 22:25:58 +0530 Subject: [PATCH] Allow using the re module in tab title templates Fix #5639 --- kitty/tab_bar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 1b3065f5a..0c074dfbb 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -2,6 +2,7 @@ # License: GPL v3 Copyright: 2018, Kovid Goyal import os +import re from functools import lru_cache, partial, wraps from string import Formatter as StringFormatter from typing import ( @@ -189,7 +190,7 @@ class TabAccessor: safe_builtins = { - 'max': max, 'min': min, 'str': str, 'repr': repr, 'abs': abs, 'len': len, + 'max': max, 'min': min, 'str': str, 'repr': repr, 'abs': abs, 'len': len, 're': re, }