Skip to content

Commit

Permalink
Merge pull request #46 from p0dalirius/fix-missing-backslash-at-end-o…
Browse files Browse the repository at this point in the history
…f-prompt

[bugfix] Fix missing backslash at the end of prompt fixes #45
  • Loading branch information
p0dalirius authored Jun 17, 2024
2 parents 92d8a63 + 2d2662b commit 0cd83d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion smbclientng/core/InteractiveShell.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,13 @@ def __prompt(self):
else:
str_prompt = "%s[\x1b[1;94m\\\\%s\\\x1b[0m]> " % (connected_dot, self.smbSession.address)
else:
str_path = "\\\\%s\\%s\\%s" % (self.smbSession.address, self.smbSession.smb_share, self.smbSession.smb_cwd.lstrip(ntpath.sep))
if len(self.smbSession.smb_cwd) == 0:
current_path = ""
else:
current_path = self.smbSession.smb_cwd.strip(ntpath.sep) + ntpath.sep

str_path = "\\\\%s\\%s\\%s" % (self.smbSession.address, self.smbSession.smb_share, current_path)

if self.config.no_colors:
str_prompt = "%s[%s]> " % (connected_dot, str_path)
else:
Expand Down

0 comments on commit 0cd83d7

Please sign in to comment.