rebase

package module
v0.0.0-...-c614afe Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MIT Imports: 9 Imported by: 0

README

go-rebase-editor

A terminal based sequence editor for git rebase -i.

Written in Go, uses bubbletea.

Similar projects

Documentation

Index

Constants

View Source
const (
	CmdPick   Cmd = 'p'
	CmdReword     = 'r'
	CmdEdit       = 'e'
	CmdSquash     = 's'
	CmdFixup      = 'f'
	CmdDrop       = 'd'
)

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Cmd

type Cmd rune

func (Cmd) String

func (cmd Cmd) String() string

type Commit

type Commit struct {
	// contains filtered or unexported fields
}

func (Commit) Render

func (c Commit) Render(w io.Writer, model table.Model, index int)

func (*Commit) SetCommand

func (c *Commit) SetCommand(cmd Cmd)

func (*Commit) String

func (c *Commit) String() string

type Commits

type Commits []Commit

func ParseCommits

func ParseCommits(r io.Reader) Commits

func (*Commits) MoveDown

func (cs *Commits) MoveDown(idx int)

func (*Commits) MoveUp

func (cs *Commits) MoveUp(idx int)

type Model

type Model struct {
	// contains filtered or unexported fields
}

func NewModel

func NewModel(commits Commits) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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