You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to pass command line arguments through from invocation into a particular pane in the script? I would like to specify a server to ssh to using something like tmuxifier load-window debug servername and as part of the window creation pass the "servername" to ssh in a pane. Here is a test script I wrote -
Using the command above to invoke it I would expect "servername" to show up somewhere in the echo statement but I get nothing except the name of the window-
vars :: 1 :: /sysadmin/home/rdhender/.tmuxifier/libexec/tmuxifier-load-window :: debug :: ::
I LOVE tmuxifier by the way, thank you for creating it!
The text was updated successfully, but these errors were encountered:
There's nothing like that at the moment, but you might be able to use environment variables. I've never tried this myself, though, so don't hold me to it :)
Basically invoke tmuxifier like so:
SERVERNAME=foobar tmuxifier load-window debug
And then do something like this in the window layout file:
run_cmd "echo $SERVERNAME"
If it works correctly, your new session will start with echoing foobar. Please let me know if it works or doesn't work :)
Off the top of my head I think it might at least work if the tmuxifier call actually starts a new tmux server, but if it's just connecting to an existing server I'm not sure if the env is forwarded.
I'll have a think about passing additional arguments to layout files. Off the top of my head I think it can get rather confusing and impractical when session layouts that themselves are loading window layouts are thrown into the mix though. We'll see :)
Is there any way to pass command line arguments through from invocation into a particular pane in the script? I would like to specify a server to ssh to using something like
tmuxifier load-window debug servername
and as part of the window creation pass the "servername" to ssh in a pane. Here is a test script I wrote -Using the command above to invoke it I would expect "servername" to show up somewhere in the echo statement but I get nothing except the name of the window-
I LOVE tmuxifier by the way, thank you for creating it!
The text was updated successfully, but these errors were encountered: