Skip to content

uruun/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/uruun/go-input-autocomplete

Usage

package main

import (
	"fmt"
	input_autocomplete "github.com/uruun/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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 96.0%
  • Makefile 4.0%