diff --git a/internal/executor/show.go b/internal/executor/show.go index 2661d0e..ba43291 100644 --- a/internal/executor/show.go +++ b/internal/executor/show.go @@ -220,7 +220,7 @@ func (c *ShowExecutor) showList(gtsClient *client.Client) error { if len(accounts) > 0 { accountMap := make(map[string]string) for i := range accounts { - accountMap[accounts[i].ID] = accounts[i].Username + accountMap[accounts[i].Acct] = accounts[i].Username } list.Accounts = accountMap diff --git a/internal/model/list.go b/internal/model/list.go index c29d235..1daac7d 100644 --- a/internal/model/list.go +++ b/internal/model/list.go @@ -105,17 +105,19 @@ func (l List) Display(noColor bool) string { ) if len(l.Accounts) > 0 { - for id, name := range l.Accounts { + for acct, name := range l.Accounts { output += fmt.Sprintf( "\n • %s (%s)", utilities.DisplayNameFormat(noColor, name), - id, + acct, ) } } else { output += "\n None" } + output += "\n" + return output }