mklement0 / ttab

macOS and Linux CLI for opening a new terminal tab/window, optionally with a command to execute and/or display settings
283 stars 15 forks source link

Ssh then perform ops? #59

Closed wrabit closed 1 year ago

wrabit commented 1 year ago

Is it possible to, for example:

ssh somesite
cd some/dir
./somescript

Seems that it opens ssh but then doesn't fire the remaining scripts..

ttab 'ssh somesite; cd /home/somewhere'

mklement0 commented 1 year ago

Use the following:

ttab "ssh somesite 'cd /home/somewhere; ...'"

That is, pass the commands to execute in the SSH session as a single string to ssh, after the hostname.