filepicker

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelFilePickerMsg

type CancelFilePickerMsg struct{}

type KeyMap

type KeyMap struct {
	ResetFileInput key.Binding `keymap-mode:"new-file"`
	Accept         key.Binding `keymap-mode:"*"`
	Help           key.Binding `keymap-mode:"*"`
	Exit           key.Binding `keymap-mode:"*"`

	CreateFile      key.Binding `keymap-mode:"browse"`
	CreateDirectory key.Binding `keymap-mode:"browse"`

	// filepicker forward
	GoToTop  key.Binding `keymap-mode:"browse"`
	GoToLast key.Binding `keymap-mode:"browse"`
	Down     key.Binding `keymap-mode:"browse"`
	Up       key.Binding `keymap-mode:"browse"`
	PageUp   key.Binding `keymap-mode:"browse"`
	PageDown key.Binding `keymap-mode:"browse"`
	Back     key.Binding `keymap-mode:"browse"`
	Forward  key.Binding `keymap-mode:"browse"`

	// buttons
	NextButton  key.Binding `keymap-mode:"confirm-new,confirm-overwrite"`
	LeftButton  key.Binding `keymap-mode:"confirm-new,confirm-overwrite"`
	RightButton key.Binding `keymap-mode:"confirm-new,confirm-overwrite"`
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

func (*KeyMap) UpdateKeyBindings

func (k *KeyMap) UpdateKeyBindings(state state, input string)

type Model

type Model struct {
	Title string
	Error string

	Filepicker bubblesfilepicker.Model

	SelectedPath string
	// contains filtered or unexported fields
}

func NewModel

func NewModel() Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type SelectFileMsg

type SelectFileMsg struct {
	Path string
}

Jump to

Keyboard shortcuts

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