Skip to content

A useful input that can autocomplete users path to directories or files when tab key is pressed

License

Notifications You must be signed in to change notification settings

JoaoDanielRufino/go-input-autocomplete

Repository files navigation

go-input-autocomplete

A useful input that can autocomplete users path to directories or files when tab key is pressed. The purpose is to be similar to bash/cmd native autocompletion.

Installation

go get github.com/JoaoDanielRufino/go-input-autocomplete

Usage

package main

import (
	"fmt"
	input_autocomplete "github.com/JoaoDanielRufino/go-input-autocomplete"
)

func main() {
	path, err := input_autocomplete.Read("Path: ")

	if err != nil {
		panic(err)
	}

	fmt.Println(path)
}

How it works

gif

About

A useful input that can autocomplete users path to directories or files when tab key is pressed

Topics

Resources

License

Stars

Watchers

Forks