tmux-python/tmuxp

Feature request: `before_script_inline`

Opened this issue · 0 comments

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.