Minor ux changes to list and get cred commands

This commit is contained in:
Mitchell 2019-06-03 02:28:43 -07:00
parent 0795f88aa0
commit e404a7ab31
2 changed files with 9 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
"sort"
"time"
"github.com/atotto/clipboard"
@ -60,11 +61,13 @@ decrypting password.`,
sources = append(sources, source)
}
sort.Strings(sources)
var prompt survey.Prompt
prompt = &survey.Select{
Message: "Source host:",
Options: sources,
PageSize: 10,
PageSize: 20,
VimMode: true,
}
@ -85,7 +88,7 @@ decrypting password.`,
prompt = &survey.Select{
Message: "Primary user key (and tag):",
Options: keys,
PageSize: 10,
PageSize: 20,
VimMode: true,
}

View File

@ -3,6 +3,7 @@ package commands
import (
"context"
"fmt"
"sort"
"time"
"github.com/spf13/cobra"
@ -52,10 +53,12 @@ includes almost all the information but the most sensitive.`,
sources = append(sources, source)
}
sort.Strings(sources)
prompt := &survey.Select{
Message: "Source host:",
Options: sources,
PageSize: 10,
PageSize: 20,
VimMode: true,
}