Documentation ¶
Index ¶
- Variables
- func NewBinaryFileModel(fs fs.FS, folder string, entry fs.DirEntry, prev tea.Model) (tea.Model, error)
- func NewBinaryModel(rdr io.ReadSeekCloser, path string, prev tea.Model) (tea.Model, error)
- func NewFileInfoModel(fs fs.FS, folder string, entry fs.DirEntry, prev tea.Model) (tea.Model, error)
- func NewFileModel(fs fs.FS, folder string, entry fs.DirEntry, prev tea.Model) (tea.Model, error)
- func NewHelpModel(prev tea.Model) (tea.Model, error)
- func NewTextModel(rdr io.Reader, path string, prev tea.Model) (tea.Model, error)
- type KeyMap
- type Model
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ Left: key.NewBinding( key.WithKeys("left", "esc"), key.WithHelp("←/esc", "view previous folder"), ), Right: key.NewBinding( key.WithKeys("right"), key.WithHelp("→", "view subfolder or file"), ), ToggleSelect: key.NewBinding( key.WithKeys("enter", " "), key.WithHelp("space/↲", "toggle selection"), ), Select: key.NewBinding( key.WithKeys("+"), key.WithHelp("+", "select directory entry"), ), DeSelect: key.NewBinding( key.WithKeys("-"), key.WithHelp("-", "deselect directory entry"), ), SelectAll: key.NewBinding( key.WithKeys("alt+=", "ctrl+="), key.WithHelp("alt+=/ctrl+=", "select all entries"), ), DeSelectAll: key.NewBinding( key.WithKeys("alt+-", "ctrl+-"), key.WithHelp("alt+-/ctrl+-", "deselect all entries"), ), RunShell: key.NewBinding( key.WithKeys("$"), key.WithHelp("$", "run shell"), ), GoHome: key.NewBinding( key.WithKeys("~", "alt+h", "ctrl+h"), key.WithHelp("~/alt+h/ctrl+h", "navigate to home folder"), ), Refresh: key.NewBinding( key.WithKeys("alt+r", "ctrl+r", "f5"), key.WithHelp("alt+r/ctrl+r/f5", "refresh directory listing"), ), Help: key.NewBinding( key.WithKeys("alt+h", "ctrl+h", "?"), key.WithHelp("?", "show help"), ), ViewBinary: key.NewBinding( key.WithKeys("#"), key.WithHelp("#", "view file bytes"), ), FileInfo: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "view file information"), ), }
Functions ¶
func NewBinaryFileModel ¶
func NewBinaryFileModel(fs fs.FS, folder string, entry fs.DirEntry, prev tea.Model) (tea.Model, error)
NewBinaryFileModel creates a new model to view a file as bytes.
func NewBinaryModel ¶
NewBinaryModel creates a new model to view a binary file.
func NewFileInfoModel ¶
func NewFileInfoModel(fs fs.FS, folder string, entry fs.DirEntry, prev tea.Model) (tea.Model, error)
NewFileInfoModel creates a new model to view file information.
func NewFileModel ¶
func NewHelpModel ¶
NewHelpMode creates a new model to view help text.
Types ¶
Click to show internal directories.
Click to hide internal directories.