mirror of
https://github.com/jchook/ranger-zoxide.git
synced 2026-01-08 11:47:28 +08:00
If no arguments, go to home directory
This commit is contained in:
parent
aefff2797b
commit
43dbcc0bff
1 changed files with 5 additions and 1 deletions
|
|
@ -24,7 +24,11 @@ class z(ranger.api.commands.Command):
|
|||
Jump around with zoxide (z)
|
||||
"""
|
||||
def execute(self):
|
||||
results = self.query(self.args[1:])
|
||||
results = None
|
||||
if len(self.args) == 1:
|
||||
results = [self.fm.home_path]
|
||||
else:
|
||||
results = self.query(self.args[1:])
|
||||
|
||||
input_path = ' '.join(self.args[1:])
|
||||
if not results and os.path.isdir(input_path):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue