Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 573 Bytes

README.md

File metadata and controls

34 lines (23 loc) · 573 Bytes

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