Environment setting support.#137
Environment setting support.#137tony merged 4 commits intotmux-python:masterfrom tasdomas:set_environment_support
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) | ||
|
|
|
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.