From 6bf4baa3801df6530fa21f0668128e86594263fa Mon Sep 17 00:00:00 2001 From: Boo <32691832+BanchouBoo@users.noreply.github.com> Date: Fri, 28 Mar 2025 14:58:08 -0400 Subject: [PATCH] Clean up zoxide command call and get current directory from ranger --- __init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/__init__.py b/__init__.py index 15f9d83..2a331c9 100644 --- a/__init__.py +++ b/__init__.py @@ -39,9 +39,8 @@ class z(ranger.api.commands.Command): def query(self, args): try: - zoxide = self.fm.execute_command(f"zoxide query --exclude \"$PWD\" {' '.join(self.args[1:])}", - stdout=PIPE - ) + zoxide = self.fm.execute_command(["zoxide", "query", "--exclude", self.fm.thisdir.path, *self.args[1:]], + stdout=PIPE) stdout, stderr = zoxide.communicate() if zoxide.returncode == 0: