Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDB(dataDir string) (*sql.DB, error)
- func EnsureDataDir() (string, error)
- type Dir
- type Store
- func (s *Store) AddCmd(cmd string) error
- func (s *Store) AddDir(d string) error
- func (s *Store) Cmd(seq int) (string, error)
- func (s *Store) FindDirs(p string) ([]Dir, error)
- func (s *Store) FirstCmd(from int, prefix string) (int, string, error)
- func (s *Store) LastCmd(upto int, prefix string) (int, string, error)
- func (s *Store) ListDirs() ([]Dir, error)
- func (s *Store) NextCmdSeq() (int, error)
Constants ¶
View Source
const (
ScoreIncrement = 10
)
Variables ¶
View Source
var (
ErrEmptyHOME = errors.New("environment variable HOME is empty")
)
View Source
var ErrNoMatchingCmd = errors.New("no matching command line")
Functions ¶
func EnsureDataDir ¶
EnsureDataDir ensures Elvish's data directory exists, creating it if necessary. It returns the path to the data directory (never with a trailing slash) and possible error.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func NewStoreDB ¶
NewStoreDB creates a new Store with a custom database. The database must be a SQLite database.
func (*Store) NextCmdSeq ¶
Click to show internal directories.
Click to hide internal directories.