mirror of
https://github.com/jchook/ranger-zoxide.git
synced 2025-12-26 18:34:56 +08:00
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:
commit
281828de06
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue