Skip to content

Commit

Permalink
Add some debugging to event_hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Spitfire1900 committed Mar 23, 2024
1 parent c3463ca commit b79a88c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xontrib_pygitstatus/event_hooks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import sys


def activate_env(path: str):
# lazy import to reduce startup cost
from xontrib.voxapi import Vox

vox = Vox()
# print('Path: %s' % path, file=sys.stderr)
vox.activate(path)


def listen_cd(olddir, newdir, **_):
'''Honors on_chdir Protocol:
https://xon.sh/events.html#on-chdir
'''
activate_env(newdir)

0 comments on commit b79a88c

Please sign in to comment.