-
Notifications
You must be signed in to change notification settings - Fork 233
Environment setting support. #137
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
tmuxp/session.py
Outdated
| if isinstance(proc.stderr, list) and len(proc.stderr) == int(1): | ||
| proc.stderr = proc.stderr[0] | ||
| raise ValueError('tmux set-environment stderr: %s' % proc.stderr) | ||
|
|
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.
thanks for the documentation
|
Good call on this @tasdomas I opened a question at tmux/tmux#304 to double check if set-environment with Tests / documentation / examples for this would be a good idea. It seems like a feature that'd be helpful in many situations. |
|
@tony, cool - I'll update the pull request and submit it for your consideration. |
|
We probably should also add Any updates on this @tasdomas? If you're having trouble / time constraints let me know. |
|
@tony, working on it - currently trying to figure out a way to test the functionality. Once that's done, everything else is relatively easy. Should have a PR by next week - a little busy at the moment. |
|
No problem, if you need help or need me to finish the test part, I'm happy to. |
|
Hello, @tony, I've updated the pull request. Extended the functionality to support setting global variables on the server as well, added some docs and enabled environment variable expansion for the variables (so setting something like PATH would be less tedious). Looking forward to your reviews. |
|
@tasdomas: Pardon the delay. Merged. This looks good to me and is useful enough of a feature to bump the version up. Uploaded to pypi as 0.11.0. |
Added new config directive 'environment', that lists environment variables to be set on the tmux session. Needs tests and documentation, but feedback if the general approach seems sensible would be very useful.