Open kiyanwang opened 8 years ago
How about using --cmd
to output a list of commands that would have been executed:
ae ssh --cmd babel-*
output
ssh -i ~/.ssh/cert mw@host1
ssh -i ~/.ssh/cert mw@host2
ssh -i ~/.ssh/cert mw@host3
It would then be trivial to use xargs
to execute each command.
I am re-considering my proposal. The user should be able to define the command that is executed once the subset of hosts has been defined by using the tab completion.
ec2.cli cmd "tmux split-window 'ssh -i {cert} {user}@{host}'" babel-
@kiyanwang any thoughts?
@markwallsgrove yeah I like that its easier to understand and provides an incredible amount of flexibility.
An interesting point to consider: do you want to let people store the templates for these commands in their config as a kind of alias?
It would be nice to do something like
and have ae launch ( or spit out ) some config that we can create wrappers around that could launch multiple windows, tmux panes etc.