mirror of https://github.com/mitchell/selfpass.git
Minor ux changes to list and get cred commands
This commit is contained in:
parent
0795f88aa0
commit
e404a7ab31
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/atotto/clipboard"
|
"github.com/atotto/clipboard"
|
||||||
|
@ -60,11 +61,13 @@ decrypting password.`,
|
||||||
sources = append(sources, source)
|
sources = append(sources, source)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Strings(sources)
|
||||||
|
|
||||||
var prompt survey.Prompt
|
var prompt survey.Prompt
|
||||||
prompt = &survey.Select{
|
prompt = &survey.Select{
|
||||||
Message: "Source host:",
|
Message: "Source host:",
|
||||||
Options: sources,
|
Options: sources,
|
||||||
PageSize: 10,
|
PageSize: 20,
|
||||||
VimMode: true,
|
VimMode: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +88,7 @@ decrypting password.`,
|
||||||
prompt = &survey.Select{
|
prompt = &survey.Select{
|
||||||
Message: "Primary user key (and tag):",
|
Message: "Primary user key (and tag):",
|
||||||
Options: keys,
|
Options: keys,
|
||||||
PageSize: 10,
|
PageSize: 20,
|
||||||
VimMode: true,
|
VimMode: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package commands
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
@ -52,10 +53,12 @@ includes almost all the information but the most sensitive.`,
|
||||||
sources = append(sources, source)
|
sources = append(sources, source)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sort.Strings(sources)
|
||||||
|
|
||||||
prompt := &survey.Select{
|
prompt := &survey.Select{
|
||||||
Message: "Source host:",
|
Message: "Source host:",
|
||||||
Options: sources,
|
Options: sources,
|
||||||
PageSize: 10,
|
PageSize: 20,
|
||||||
VimMode: true,
|
VimMode: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue