convert of login items keeps original env names in fields; env now also exposes the login triple so sourced consumers can map to legacy names. Ticket: https://projects.knownelement.com/issues/832
This commit is contained in:
@@ -251,6 +251,15 @@ func cmdEnv(name string) error {
|
||||
v := strings.ReplaceAll(f.Value, "'", "'\\''")
|
||||
fmt.Printf("export %s='%s'\n", f.Name, v)
|
||||
}
|
||||
if len(pc.URIs) > 0 {
|
||||
fmt.Printf("export URI='%s'\n", pc.URIs[0])
|
||||
}
|
||||
if pc.Login.Username != "" {
|
||||
fmt.Printf("export USERNAME='%s'\n", pc.Login.Username)
|
||||
}
|
||||
if pc.Login.Password != "" {
|
||||
fmt.Printf("export PASSWORD='%s'\n", pc.Login.Password)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -537,3 +546,5 @@ func cmdConvert(name string) error {
|
||||
fmt.Printf("converted: %s (user=%v pass=%v uris=%d fields=%d)\n", name, username != "", password != "", len(uris), len(rest))
|
||||
return nil
|
||||
}
|
||||
|
||||
func urisOf(pc *PlainCipher) []string { return pc.URIs }
|
||||
|
||||
Reference in New Issue
Block a user