pass_typer: Match just server part of user@server for aliases

This commit is contained in:
Adam Goldsmith 2022-03-24 18:39:51 -04:00
parent 196b9802ad
commit ba2521bec2

View File

@ -15,11 +15,11 @@ cmd = partial(subprocess.run, capture_output=True, encoding="ascii")
def alias(server_name): def alias(server_name):
match server_name: match server_name.rpartition("@"):
case "salt": case [_, _, "salt"]:
return "cms-net-svcs" return 'cms/*cms-net-svcs'
case "iPad1" | "iPad2" | "iPad3": case [_, _, ("iPad1" | "iPad2" | "iPad3")]:
return "ipads" return 'cms/*ipads'
case _: case _:
return server_name return server_name