...

Package completer

import "github.com/c-bata/go-prompt/completer"
Overview
Index

Overview ▾

Variables

var (
    // FilePathCompletionSeparator holds separate characters.
    FilePathCompletionSeparator = string([]byte{' ', os.PathSeparator})
)

type FilePathCompleter

FilePathCompleter is a completer for your local file system. Please caution that you need to set OptionCompletionWordSeparator(completer.FilePathCompletionSeparator) when you use this completer.

type FilePathCompleter struct {
    Filter     func(fi os.FileInfo) bool
    IgnoreCase bool
    // contains filtered or unexported fields
}

func (*FilePathCompleter) Complete

func (c *FilePathCompleter) Complete(d prompt.Document) []prompt.Suggest

Complete returns suggestions from your local file system.