Merge pull request #17 from BanchouBoo/master

Clean up zoxide command call and get current directory from ranger
This commit is contained in:
Wes Roberts 2026-04-01 01:03:37 -04:00 committed by GitHub
commit 8455744454
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: