elvish/edit/historyListing.go

22 lines
381 B
Go
Raw Normal View History

2016-02-14 15:52:31 +08:00
package edit
import "github.com/elves/elvish/store"
// Command history listing subosytem.
type historyListing struct {
all []string
}
func newHistoryListing(s *store.Store) (*historyListing, error) {
seq, err := s.NextCmdSeq()
if err != nil {
return nil, err
}
cmds, err := s.Cmds(seq-100, seq)
if err != nil {
return nil, err
}
return &historyListing{cmds}, nil
}