Skip to content

Feature idea: Send command w/o executing it #735

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

Closed
ThiefMaster opened this issue Feb 7, 2022 · 9 comments
Closed

Feature idea: Send command w/o executing it #735

ThiefMaster opened this issue Feb 7, 2022 · 9 comments

Comments

@ThiefMaster
Copy link
Contributor

I have some ssh whatever commands in my tmuxp config; and some of those require multi-factor auth so running them automatically when launching the session is not great.

Currently I use workarounds such as read && ssh whatever so the ssh command doesn't run immediately, but I think an option to just send the command but not the ENTER key to actually execute it would be much nicer.

@tony
Copy link
Member

tony commented Feb 7, 2022

@ThiefMaster I am considering adding something for this. Have a suggestion for what the yaml should look like? e.g. send_keys: false in the command of a pane?

P.S. Have you tried this? #293 (comment)

cc: #293

@ThiefMaster
Copy link
Contributor Author

send_enter: false or execute_command: false maybe?

@tony
Copy link
Member

tony commented Feb 7, 2022

We will add that soon, then (send_keys=False for last command in a pane)

@tony
Copy link
Member

tony commented Feb 7, 2022

Did you try adding a \ to the end of the command yet?

@ThiefMaster
Copy link
Contributor Author

nope - but in any case that would require changing something (e.g. deleting the backspace) just like my read && workaround ;)

@tony
Copy link
Member

tony commented Feb 7, 2022

Got it

send_keys: false will be simple enough to add and will resolve this and #293

@thiagowfx
Copy link

send_keys: false sounds sensible / reasonable. dry-run: true is an alternative I'd suggest.

@tony
Copy link
Member

tony commented Mar 12, 2022

@ThiefMaster @thiagowfx

I am going to move this to the oldest issue

Duplicate of #53

@tony tony closed this as completed Mar 12, 2022
@tmux-python tmux-python locked and limited conversation to collaborators Mar 12, 2022
@tony
Copy link
Member

tony commented Mar 12, 2022

@thiagowfx

1.10.0b1 superseded by 1.10.0b3+

Live in 1.10.0b1 pypi branch

pip install --user --upgrade tmuxp==1.10.0b1

or pipx install [email protected] 'tmuxp==1.10.0b1' then [email protected] load <yaml file>

docs: skip command execution

session_name: Should not execute
windows:
- panes:
  - shell_command: echo "___$((1 + 3))___"
    enter: false

See v1.10.0b3: #53 (comment)

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

No branches or pull requests

3 participants