Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mazzz1y committed Dec 10, 2022
1 parent a0ee884 commit 11ba6d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions pkg/prompt/prompt.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package prompt

import (
"strconv"

"github.com/dmirubtsov/mcli/pkg/shortcuts"
"github.com/erikgeiser/promptkit/selection"
"github.com/erikgeiser/promptkit/textinput"
"strconv"
)

func InputPromptInt(label string) (string, error) {
Expand All @@ -24,8 +25,8 @@ func InputPromptString(label string) (string, error) {

func SelectionPrompt(ss shortcuts.Shortcuts, size int) (int, error) {
sel := selection.New("", ss)
sel.Template = SelectionSelectTemplate
sel.ResultTemplate = SelectionResultTemplate
sel.Template = selectionSelectTemplate
sel.ResultTemplate = selectionResultTemplate
sel.FilterPlaceholder = filterPlaceholderText
sel.Filter = selectionFilter
sel.SelectedChoiceStyle = selectedChoiceStyle
Expand Down
4 changes: 2 additions & 2 deletions pkg/prompt/templates.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package prompt

const SelectionSelectTemplate = `
const selectionSelectTemplate = `
{{- if .Prompt -}}
{{ Bold .Prompt }}
{{ end -}}
Expand All @@ -27,6 +27,6 @@ const SelectionSelectTemplate = `
{{- end }}
{{- end}}
`
const SelectionResultTemplate = `
const selectionResultTemplate = `
{{- print FinalSymbolStyle " " (Final .FinalChoice) "\n" -}}
`
14 changes: 7 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ Simple shortcut menu for shell commands

## Installation

#### macOS

```bash
brew tap mazzz1y/tap
brew install mcli
```

#### Arch Linux

```bash
Expand All @@ -29,6 +22,13 @@ paru -S mcli-bin

Packages available on the [Releases](https://github.com/mazzz1y/mcli/releases) page

#### macOS

```bash
brew tap mazzz1y/tap
brew install mcli
```

## Usage

```
Expand Down

0 comments on commit 11ba6d9

Please sign in to comment.