Skip to content

Commit

Permalink
Merge pull request #19 from bestlem/pr-python312
Browse files Browse the repository at this point in the history
Use python code for the formatted string
  • Loading branch information
con-f-use authored Jul 19, 2024
2 parents 76d479a + 8103351 commit 2b942d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ Contributors
* Greg Hellings (@greg-hellings, contributor)
* Andy Kipp (@anki-code, contributor)
* Alexander Sosedkin (@t184256, contributor)
* Mark Bestley (@bestlem, contributor)
2 changes: 1 addition & 1 deletion xontrib/direnv.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __direnv_post_rc(**kwargs) -> None:
@events.on_chdir
def __direnv_chdir(olddir: str, newdir: str, **kwargs) -> None:
if ${...}.get("DIRENV_DIR") is not None:
direnv_dir = pf"{$DIRENV_DIR.strip('-')}"
direnv_dir = pf"{__xonsh__.env.get('DIRENV_DIR').strip('-')}"
new = pf"{newdir}".absolute()
if not set(direnv_dir.parts).issubset(new.parts):
__direnv()
Expand Down

0 comments on commit 2b942d8

Please sign in to comment.