-
Notifications
You must be signed in to change notification settings - Fork 124
Added load -t flag for recording a transcript based on a script file #652
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
The load command now supports the -r/--record_transcript flag for recording a transcript file based on a script file.
Codecov Report
@@ Coverage Diff @@
## master #652 +/- ##
==========================================
- Coverage 94.48% 94.46% -0.02%
==========================================
Files 11 11
Lines 3062 3072 +10
==========================================
+ Hits 2893 2902 +9
- Misses 169 170 +1
Continue to review full report at Codecov.
|
Also: - Removed guard clauses which kmvanbrunt promises will be unecessary with his upcoming change - Moved transcript path validation inside _generate_transcript()
|
My current code used to run with 0.9.10, I wanted to try this PR and it failed with my current code is the doc says to pass it as a parameter now (might be cleaner) but I am confused by the |
|
@teto Well you are the first to encounter some cleanup code that we just merged in tonight. It is a breaking change, but we have been trying to make the hard choices prior to a 1.0 release to cleanup certain things. You should be able to modify your current code to: shortcuts = dict(self.DEFAULT_SHORTCUTS)
shortcuts.update({
'lm': 'list_mptcp_connections',
'lt': 'list_tcp_connections',
'ls': 'list_subflows',
'lr': 'list_reinjections'
})
super().__init__(completekey='tab', stdin=stdin, shortcuts=shortcuts)I thought of potentially making |
|
It does what I want and I think it works fine but I put the results here just in case you are interested. Here my tests/script_mptcp.txt testing the command (it doesn't print the command name but maybe it's because I customized something) generated this output |
|
Thanks for the feedback. I will change both commands to use a -t flag for consistency. |
The load command now supports the -t/--transcript flag for recording a transcript file based on a script file like so:
20:44 $ examples/hello_cmd2.py (Cmd) load examples/scripts/script.txt -t tran.txt 2 commands and their outputs saved to transcript file 'tran.txt' (Cmd)Also updated the documentation for scripts and transcripts accordingly.
This closes #639
This closes #651
TODO