pass_typer: Match just server part of user@server for aliases
This commit is contained in:
parent
196b9802ad
commit
ba2521bec2
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user