]> git.phdru.name Git - dotfiles.git/commitdiff
Feat(lib/python/init.py): Add `unset_history()`
authorOleg Broytman <phd@phdru.name>
Wed, 19 Mar 2025 15:55:01 +0000 (18:55 +0300)
committerOleg Broytman <phd@phdru.name>
Wed, 19 Mar 2025 15:55:01 +0000 (18:55 +0300)
lib/python/init.py

index 733e0f2a4d30651a7fa8af41c05a4170dfebfb58..4bd52581da2d5f07ee33d8914854f869ffbb078b 100644 (file)
@@ -64,7 +64,10 @@ def init():
         import atexit
         atexit.register(savehist)
 
+        def unset_history():
             import atexit
+            atexit._exithandlers = []
+        builtins.unset_history = unset_history
 
     except (ImportError, AttributeError):
         # no readline or atexit, or readline doesn't have