Merge pull request #14 from Foo-x/13-cd-not-in-db

feat: allow cd to dir not in zoxide database
This commit is contained in:
Wes Roberts 2024-02-08 03:18:31 -05:00 committed by GitHub
commit 281828de06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,6 +25,12 @@ class z(ranger.api.commands.Command):
"""
def execute(self):
results = self.query(self.args[1:])
input_path = ' '.join(self.args[1:])
if not results and os.path.isdir(input_path):
self.fm.cd(input_path)
return
if not results:
return