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):
|
||||
match server_name:
|
||||
case "salt":
|
||||
return "cms-net-svcs"
|
||||
case "iPad1" | "iPad2" | "iPad3":
|
||||
return "ipads"
|
||||
match server_name.rpartition("@"):
|
||||
case [_, _, "salt"]:
|
||||
return 'cms/*cms-net-svcs'
|
||||
case [_, _, ("iPad1" | "iPad2" | "iPad3")]:
|
||||
return 'cms/*ipads'
|
||||
case _:
|
||||
return server_name
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user