|
|
@ -15,6 +15,7 @@ from typing import *
|
|
|
|
# Usage: $0 remote.host.name md1 ...
|
|
|
|
# Usage: $0 remote.host.name md1 ...
|
|
|
|
|
|
|
|
|
|
|
|
host: str
|
|
|
|
host: str
|
|
|
|
|
|
|
|
directory: str = None
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
def main():
|
|
|
|
if len(sys.argv) < 3:
|
|
|
|
if len(sys.argv) < 3:
|
|
|
@ -63,7 +64,7 @@ def parse_snippet(s: Tuple[str, str]) -> Sequence[Command]:
|
|
|
|
|
|
|
|
|
|
|
|
# We now check the separate lines and possibly tweak them (e.g. by removing sudo-s)
|
|
|
|
# We now check the separate lines and possibly tweak them (e.g. by removing sudo-s)
|
|
|
|
lines = s[1].split('\n')
|
|
|
|
lines = s[1].split('\n')
|
|
|
|
directory = None # Don't cd by default
|
|
|
|
global directory
|
|
|
|
result = []
|
|
|
|
result = []
|
|
|
|
for line in lines:
|
|
|
|
for line in lines:
|
|
|
|
user = None # This allows (in conjunction with the right order of arguments to 'ssh') to specify the default user in the hostname (as 'user@host.name')
|
|
|
|
user = None # This allows (in conjunction with the right order of arguments to 'ssh') to specify the default user in the hostname (as 'user@host.name')
|
|
|
|