4 Commits

Author SHA1 Message Date
5b389aa9dc update install link to match new repo name
update taskfile for local builds
2025-06-18 06:08:05 +01:00
bb535f296d fix link 2025-06-18 04:03:13 +01:00
5eccfc939c upd special thanks 2025-06-18 04:02:39 +01:00
00638a6bf4 fix typo 2025-06-18 03:51:58 +01:00
3 changed files with 12 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
![Linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)
![macOS](https://img.shields.io/badge/mac%20os-000000?style=for-the-badge&logo=macos&logoColor=F0F0F0)
# ignr-cli
# ignr
Simple no-frills .gitignore generator backed by the Github API.
@@ -11,7 +11,7 @@ Simple no-frills .gitignore generator backed by the Github API.
## Install
```console
go install github.com/onyx-and-iris/ignr-cli@latest
go install github.com/onyx-and-iris/ignr@latest
```
## Configuration
@@ -41,7 +41,7 @@ export IGNR_FILTER=startswith
Trigger the selection prompt.
```console
ignr-cli new
ignr new
```
The prompt filter can be activated by pressing `/`:
@@ -50,4 +50,5 @@ The prompt filter can be activated by pressing `/`:
## Special Thanks
- [Charm](https://github.com/charmbracelet) for their awesome CLI packages.
- [spf13](https://github.com/spf13) for the [cobra](https://github.com/spf13/cobra) and [viper](https://github.com/spf13/viper) packages.
- [Manifold](https://github.com/manifoldco) for the [promptui](https://github.com/manifoldco/promptui) package.

View File

@@ -1,7 +1,7 @@
version: '3'
vars:
PROGRAM: ignr-cli
PROGRAM: ignr
SHELL: '{{if eq .OS "Windows_NT"}}powershell{{end}}'
BIN_DIR: bin
VERSION:
@@ -12,12 +12,12 @@ vars:
tasks:
default:
desc: Build the ignr-cli project
desc: Build the ignr project
cmds:
- task: build
build:
desc: Build the ignr-cli project
desc: Build the ignr project
deps: [vet]
cmds:
- task: build-windows
@@ -35,13 +35,13 @@ tasks:
- go fmt ./...
build-windows:
desc: Build the ignr-cli project for Windows
desc: Build the ignr project for Windows
cmds:
- GOOS=windows GOARCH=amd64 go build -o {{.WINDOWS}} -ldflags="-X main.version={{.VERSION}}"
internal: true
build-linux:
desc: Build the ignr-cli project for Linux
desc: Build the ignr project for Linux
cmds:
- GOOS=linux GOARCH=amd64 go build -o {{.LINUX}} -ldflags="-X main.version={{.VERSION}}"
internal: true

4
new.go
View File

@@ -67,7 +67,7 @@ func runPrompt(client *github.Client, height int) (*github.Gitignore, error) {
return nil, fmt.Errorf("error retrieving gitignore template list: %w", err)
}
selectTemmplates := &promptui.SelectTemplates{
selectTemplates := &promptui.SelectTemplates{
Label: ` {{ "\U0000007C" | faint }} {{ . | magenta | bold }}`,
Active: `{{ "\U0000007C" | faint }} {{ "🌶" | red }} {{ . | cyan | italic }}`,
Inactive: `{{ "\U0000007C" | faint }} {{ . | faint }}`,
@@ -77,7 +77,7 @@ func runPrompt(client *github.Client, height int) (*github.Gitignore, error) {
prompt := promptui.Select{
Label: "Select a .gitignore template",
Items: templates,
Templates: selectTemmplates,
Templates: selectTemplates,
Size: height,
Searcher: filterFunc(templates),
}