mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-04 10:57:50 +08:00
22 lines
381 B
Go
22 lines
381 B
Go
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
|
|
}
|