-
Notifications
You must be signed in to change notification settings - Fork 0
/
alias_options.go
41 lines (33 loc) · 1000 Bytes
/
alias_options.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package prompts
import (
"fmt"
"github.com/giuseppe-g-gelardi/git-sessionizer/cli/templates"
"github.com/giuseppe-g-gelardi/git-sessionizer/util"
)
func ConfigureAliasOptions() string {
var alias string = ""
description := "An editor alias is a shorthand or custom command used in software development to quickly invoke a specific text editor or integrated development environment (IDE) with predefined settings or options."
aliasOptions := []templates.DialogOption{
{
Name: "Yes!",
Value: true,
Description: util.WrapText(description, 80),
},
{
Name: "Nope!",
Value: false,
Description: util.WrapText(description, 80),
},
}
selectedOption := templates.RenderSelect("Confirm Alias Options", aliasOptions, 4)
if selectedOption == true {
ans, err := templates.RenderPrompt()
if err != nil {
fmt.Printf("Something went wrong... %v\n", err)
}
alias = ans
} else if selectedOption == false {
alias = ""
}
return alias
}