-
Notifications
You must be signed in to change notification settings - Fork 232
Use session's start_directory in session creation #197
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
Current coverage is 83.91% (diff: 100%)@@ master #197 diff @@
==========================================
Files 5 5
Lines 742 746 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 622 626 +4
Misses 120 120
Partials 0 0
|
This is breaking tests on tmux 1.8. Maybe it can be a conditional support on the tmux version? |
Done! |
is_version('something') fails with installed tmux 1.9a To allow tmux-python/tmuxp#197 ;-)
* Fix error when using is_version with lettered tmux version is_version('something') fails with installed tmux 1.9a To allow tmux-python/tmuxp#197 ;-) * Parse versions before comparing them in is_version * Add is_version tests with lettered tmux versions * Use LooseVersion instead of StrictVersion
Rebased against df60657 |
@minijackson can you make tests for this? |
Sure thing |
Unfortunately, I can't find a way to get the working directory of a session (even with tmux commands). I could inspect the process to see it's cwd, but that doesn't seem to be the right solution to me… |
The session's environment doesn't have the right PWD, so I'm guessing that even inspecting the process is a no-go |
Sorry for the late response, I am having issues keeping up with the project. I'm seeking maintainers @ #290. If you (or someone you know) may be interested in helping maintain libtmux or tmuxp, feel free to contact me by email or in the #290 issue. In the mean time, if you're still interested in this PR, can you rebase it via |
@minijackson Can you rebase this? I just merged #623 which moves us to a poetry packaging setup and will runs the PR through GitHub actions. Also, air traffic control, is this the same as #403? |
This will make tmux's whole session be in a given directory, instead of just changing windows and panes' relative paths
Done! |
@minijackson Thank you! Is it possible you could check out the linting issue? @anddam I just had an issue with you being let out of a PR at #441. In this case it seems @minijackson had this before you, but do you have any comments on this approach vs your own? |
Codecov Report
@@ Coverage Diff @@
## master #197 +/- ##
==========================================
- Coverage 77.08% 76.95% -0.14%
==========================================
Files 6 6
Lines 829 833 +4
Branches 238 239 +1
==========================================
+ Hits 639 641 +2
- Misses 131 132 +1
- Partials 59 60 +1
Continue to review full report at Codecov.
|
Lint should pass now ^^ |
Oh, I cannot find the |
There we go! It simply was renamed to |
@minijackson That leads me to a more questions, since if I publish, this goes to a lot of users that already have a bit of using tmuxp without this If I could - I'd just have had this have been the default behavior. My concern is atm people are relying on this and triggering automated stuff. I'm wondering if we should add this - but feature flag it somehow so users aren't caught with a new behavior off guard Would this change behavior / disrupt any users using the current behavior as it is on Is this something we should issue a deprecation warning behavior ? Have toggleable via an option? Phase it in via an env variable? Could you write something to |
Also I may be overthinking it by the way - let me know what you think 😊 |
I think you're right that this changes could break some setup for end user: if a launched script creates a new window or pane dynamically for example. This may be a quite specific usecase, but not impossible to imagine. Breaking this usecase could be avoided by adding a new option (like I don't think this is optimal, since that means the behavior of the session's I'm afraid the choice isn't clear cut, and I don't think it is mine to make, but either way I'm happy to use a different option name, and update the doc if you want. |
@minijackson I propose you document this in I think I will then release this in 1.6.0, rather than a bug/patch-level release. To be super safe. Rationale:
|
@tony That's fine with me! I'll see if I can document that tomorrow. |
@minijackson Sounds good! |
@tony I'v updated the CHANGES file, but I'm not sure if or where I should update the documentation |
He actually managed the 1.8 case I was asking about in my PR. |
@minijackson I am unsure of what the original problem was here, but it seems like this may be solving the case of new windows/panes (from |
Yes, looking at the diff of #639, it seems that this PR is now a duplicate. Thank you for telling me! |
This will make tmux's whole session be in a given directory, instead of just changing windows and panes' relative paths