search

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandPty

func CommandPty(cmd string) error

func ExecCommandString

func ExecCommandString(cmd string) (string, error)

func In

func In(target string, source []string) bool

快速判断字符是否在字符数组中

func Run

func Run(unsearch []string, show bool)

Types

type TuiScreen

type TuiScreen struct {
	EnableMouse bool // 开启鼠标可用
	EnablePaste bool // 开启粘贴板可用

	X            int
	Y            int
	Input        []rune   // 键盘输入结果
	Files        []string // 文件查询总结果
	Total        int
	SearchNum    int
	SearchResult []string // 搜索临时结果

	MaxContent int // 最多显示条数
	CursorPos  int // 搜索光标位置 0 < CursorPos <= MaxContent
	CurContent string

	Unsearch []string
	// contains filtered or unexported fields
}

func (*TuiScreen) Clear

func (t *TuiScreen) Clear()

func (*TuiScreen) Draw

func (t *TuiScreen) Draw(x1, y1, x2, y2 int, text string)

func (*TuiScreen) Event

func (t *TuiScreen) Event()

func (*TuiScreen) Fd

func (r *TuiScreen) Fd() int

func (*TuiScreen) FuzzySearch

func (t *TuiScreen) FuzzySearch()

func (*TuiScreen) GetAllFiles

func (t *TuiScreen) GetAllFiles(dirPth string, istop bool) error

递归获取当前目录所有文件

func (*TuiScreen) GetCommand

func (t *TuiScreen) GetCommand()

func (*TuiScreen) GetFiles

func (t *TuiScreen) GetFiles(dirPath string) error

func (*TuiScreen) Gopsutil

func (t *TuiScreen) Gopsutil() error

func (*TuiScreen) HttpCode

func (t *TuiScreen) HttpCode()

func (*TuiScreen) SetCursor

func (t *TuiScreen) SetCursor(x, y int, value string)

func (*TuiScreen) Show

func (t *TuiScreen) Show()

func (*TuiScreen) ShowAllFiles

func (t *TuiScreen) ShowAllFiles()

func (*TuiScreen) ShowCount

func (t *TuiScreen) ShowCount()

func (*TuiScreen) ShowFiles

func (t *TuiScreen) ShowFiles()

func (*TuiScreen) ShowResultFiles

func (t *TuiScreen) ShowResultFiles(up bool)

移动历史记录

func (*TuiScreen) Sync

func (t *TuiScreen) Sync()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL