filebrowser

package
v0.0.0-...-881f335 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const GoGopher = "\ue724"
View Source
const GoGopherDev = "\ue626"
View Source
const GoTitle = "\U000F07D3"
View Source
const IconFile = "\U000F0214"
View Source
const IconFolder = "\U000F024B"

Variables

This section is empty.

Functions

func FileColor

func FileColor(ti *teatree.TreeItem) lipgloss.Style

func FileIcon

func FileIcon(ti *teatree.TreeItem) string

func FolderColor

func FolderColor(ti *teatree.TreeItem) lipgloss.Style

func FolderIcon

func FolderIcon(ti *teatree.TreeItem) string

func GoFileColor

func GoFileColor(ti *teatree.TreeItem) lipgloss.Style

func GoFileIcon

func GoFileIcon(ti *teatree.TreeItem) string

func TextColor

func TextColor(ti *teatree.TreeItem) lipgloss.Style

Types

type FileBrowserModel

type FileBrowserModel struct {
	Tree *teatree.Tree
	// contains filtered or unexported fields
}

func New

func New(dir string) *FileBrowserModel

func New(dir string) tea.Model {

func (*FileBrowserModel) Blur

func (fbm *FileBrowserModel) Blur() tea.Cmd

func (*FileBrowserModel) Error

func (fbm *FileBrowserModel) Error() error

func (*FileBrowserModel) Focus

func (fbm *FileBrowserModel) Focus() tea.Cmd

func (*FileBrowserModel) GetKey

func (fbm *FileBrowserModel) GetKey() string

GetKey returns the field's key.

func (*FileBrowserModel) GetValue

func (fbm *FileBrowserModel) GetValue() any

GetValue returns the field's value.

func (*FileBrowserModel) Init

func (fm *FileBrowserModel) Init() tea.Cmd

func (*FileBrowserModel) KeyBinds

func (fbm *FileBrowserModel) KeyBinds() []key.Binding

func (*FileBrowserModel) Run

func (fbm *FileBrowserModel) Run() error

func (*FileBrowserModel) Skip

func (fbm *FileBrowserModel) Skip() bool

Skip returns whether this input should be skipped or not.

func (*FileBrowserModel) Update

func (fm *FileBrowserModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*FileBrowserModel) Value

func (fbm *FileBrowserModel) Value(value *string) *FileBrowserModel

func (*FileBrowserModel) View

func (fm *FileBrowserModel) View() string

func (*FileBrowserModel) WithAccessible

func (fbm *FileBrowserModel) WithAccessible(accessible bool) huh.Field

WithAccessible sets the accessible mode of the input field.

func (*FileBrowserModel) WithHeight

func (fbm *FileBrowserModel) WithHeight(height int) huh.Field

WithHeight sets the height of the input field.

func (*FileBrowserModel) WithKeyMap

func (fbm *FileBrowserModel) WithKeyMap(k *huh.KeyMap) huh.Field

WithKeyMap sets the keymap on an input field.

func (*FileBrowserModel) WithPosition

func (fbm *FileBrowserModel) WithPosition(p huh.FieldPosition) huh.Field

WithPosition sets the position of the input field.

func (*FileBrowserModel) WithTheme

func (fbm *FileBrowserModel) WithTheme(theme *huh.Theme) huh.Field

WithTheme sets the theme on a field.

func (*FileBrowserModel) WithWidth

func (fbm *FileBrowserModel) WithWidth(width int) huh.Field

WithWidth sets the width of the input field.

Jump to

Keyboard shortcuts

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