EnsureHamrpass returns the hamrpass profile, re-creating it from the seed if the user deleted it. Lets /hamrpass activate by pasting a key without a restart detour.
()
| 210 | // the user deleted it. Lets /hamrpass activate by pasting a key without a |
| 211 | // restart detour. |
| 212 | func (c *Config) EnsureHamrpass() *Profile { |
| 213 | if hp, ok := c.Models["hamrpass"]; ok { |
| 214 | return hp |
| 215 | } |
| 216 | tmpl := managedProfiles["hamrpass"] |
| 217 | if c.Models == nil { |
| 218 | c.Models = map[string]*Profile{} |
| 219 | } |
| 220 | c.Models["hamrpass"] = &tmpl |
| 221 | return c.Models["hamrpass"] |
| 222 | } |
| 223 | |
| 224 | // ResolvedKey returns the profile's key, expanding it against the process |
| 225 | // environment when the WHOLE key is a `${VAR}` reference (the advertised |
no outgoing calls