sortmodel

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SortOptionsShortStr = []string{
	"Name", "Size", "Date", "Type", "Natural",
}
View Source
var SortOptionsStr = []string{
	"Name", "Size", "Date Modified", "Type", "Natural",
}

Functions

This section is empty.

Types

type Model

type Model struct {
	Width  int
	Height int

	// Cursor has meaning only during open state, its lost on close
	Cursor int
	// contains filtered or unexported fields
}

Sort options

func New

func New() Model

func (*Model) Close

func (m *Model) Close()

func (*Model) GetSelectedKind

func (m *Model) GetSelectedKind() SortKind

func (*Model) IsOpen

func (m *Model) IsOpen() bool

func (*Model) ListDown

func (m *Model) ListDown()

func (*Model) ListUp

func (m *Model) ListUp()

func (*Model) Open

func (m *Model) Open(curSortKind SortKind)

func (*Model) Render

func (m *Model) Render() string

type SortKind

type SortKind int
const (
	SortByName SortKind = iota
	SortBySize
	SortByDate
	SortByType
	SortByNatural
)

NOTE: Update the validation of DefaultSortType config if you make changes here

Jump to

Keyboard shortcuts

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