Skip to content

Commit

Permalink
fix: ld cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
logandhillon committed Jul 12, 2024
1 parent f5ac495 commit 7c5653f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bdsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def __init__(self, stdout: TextIO, stdin: TextIO, **is_ssh: bool):

def cmd_ld(self, args):
try:
self.print('\t'.join([item + '/' if os.path.isdir(os.path.join(self.get_path(args[1] if len(args) > 1 else ""), item)) else item for item in os.listdir(self.get_path(args[1] if len(args) > 1 else ""))]))
dir = self.get_path(args[1]) if len(args) > 1 else self.path
items = os.listdir(dir)
self.print('\t'.join([item + '/' if os.path.isdir(os.path.join(dir, item)) else item for item in items]))
except FileNotFoundError:
self.print(f"{args[0]}: {args[1]}: does not exist")

Expand Down

0 comments on commit 7c5653f

Please sign in to comment.