Shell prompt: Offer to attach / create unset server, window, session, launch within#642
Open
Shell prompt: Offer to attach / create unset server, window, session, launch within#642
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #642 +/- ##
==========================================
- Coverage 81.96% 81.80% -0.17%
==========================================
Files 28 28
Lines 2545 2566 +21
Branches 485 490 +5
==========================================
+ Hits 2086 2099 +13
- Misses 328 333 +5
- Partials 131 134 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1f63506 to
98b1205
Compare
0f75f46 to
2f4a907
Compare
b0e744e to
5323c18
Compare
1298511 to
be197a9
Compare
98b1205 to
94bd460
Compare
1989584 to
b30a864
Compare
why: Make `tmuxp shell` resilient when the targeted server or session doesn't exist yet — interactive users can opt in to creating them instead of being met with an error and having to retry. Non-interactive contexts (tests, scripts, CI) keep their original raise semantics. what: - Add `-y`/`--yes` flag to skip prompts and proceed with creation - On dead server: prompt (or auto-yes) to start one with new_session - On missing session: prompt (or auto-yes) to create the session - Reset current_pane when its session_id no longer matches the resolved session, so downstream get_window/get_pane uses the new session - Gate prompts on sys.stdin.isatty() so non-TTY callers still raise - Add tests for `--yes` create-on-missing and non-interactive raise Re-ports PR #642 (originally written against the pre-`src/` layout in tmuxp/cli.py + tmuxp/util.py) onto current src/tmuxp/cli/shell.py. Drops the WIP commit's print() debugs and unused --detached flag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.