public override bool AutoComplete(out string correction, ParsedCommand parsedCommand) { correction = ""; if (!parsedCommand.PopArgument(out string input)) { return(false); } PublicKey key = HostHandler.I.currentHost.GetComponent <SshKey>(); if (key == null) { return(false); } if (!key.isAvailable) { return(false); } if (!key.GetName().StartsWith(input)) { return(false); } parsedCommand.arguments.Add(key.GetName()); correction = parsedCommand.GetCommandString(); return(true); }
protected bool ArgumentIsUserHostPair(string argument) { PublicKey key = HostHandler.I.currentHost.GetComponent <SshKey>(); if (key.GetName() != argument) { return(false); } if (!key.isAvailable) { return(false); } return(true); }