-
Notifications
You must be signed in to change notification settings - Fork 71
Add fixes for target-shell prompt #943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #943 +/- ##
==========================================
- Coverage 79.17% 79.16% -0.01%
==========================================
Files 344 344
Lines 30350 30352 +2
==========================================
Hits 24029 24029
- Misses 6321 6323 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
58a51a2 to
82f4b4b
Compare
dissect/target/tools/shell.py
Outdated
| def do_man(self, line: str) -> bool: | ||
| """alias for help""" | ||
| self.do_help(line) | ||
| return True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it should return False. If a do_ or cmd_ function returns True it is a sign the Cli should exit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aah, TIL. Will change it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of counter intuitive if you ask me, but that's how it works 😅. Perhaps it is inspired by 0 and 1 exit codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it definitely feels counterintuitive. I guess its the exit code thing to make it feel like a shell where a non zero value gets treated as an error. Anyway, fixed!
82f4b4b to
b28fc72
Compare
2384f1e to
f70001b
Compare
7d89a00 to
98af1a9
Compare
And some miscellaneous fixes of typing and consistency
Co-authored-by: Erik Schamper <[email protected]>
98af1a9 to
2a93fe1
Compare
There was an issue with the
TargetCmdin the case the prompt was defined in the config file, yet didn't contain{cmd}or{base}. This fixes that issueand some fixes for typing consistency