Skip to content

Feature request: before_script_inline #966

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

Open
errge opened this issue Feb 19, 2025 · 0 comments
Open

Feature request: before_script_inline #966

errge opened this issue Feb 19, 2025 · 0 comments

Comments

@errge
Copy link

errge commented Feb 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant