tmux-python / tmux-python/tmuxp
Feature request: `before_script_inline`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 248
- Avg merge
- 2h 13m
- Merged PRs (30d)
- 1
Description
Hey! Amazing project, very well executed!
My feature request: possibility for inlining a whole script in in before_script, e.g.:
#!/usr/bin/tmuxp load
session_name: shorthands
# global_options:
# socket_path: /tmp/socksock
start_directory: /tmp
environment:
HISTFILE: ''
suppress_history: false
before_script_inline: |
set -eou pipefail
/home/foobar/complicated-stuff | with pipes && and special shell syntax, whatevers
false || true
windows:
...
tmuxp should still check the exit value, and the whole script should be piped to $SHELL, so the user can use whichever shell they prefer. Other than that, I think it should behave similar to before_script, so similar PWD, environment, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the existing before_script implementation and its configuration validation, then compare its working directory and environment handling with the requested inline form. Done means a multiline before_script_inline value is passed to $SHELL, preserves the relevant context, and reports the script's exit status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100