Skip to content

Repository files navigation

abcd

A Better Console Diff

CLI

abcd [--staged] [treeish]

opens a pager, watches for changes, and updates the diff

Library

package main
import (
"encoding/json""fmt""os"
abcd "github.com/jshawl/abcd"
)
funcmain() {
cmd:=exec.Command("git", "diff")
stdout, err:=cmd.Output()
diff:=abcd.ParseDiff(string(stdout))
diffJson, _:=json.MarshalIndent(diff, "", " ")
fmt.Println(string(diffJson))
}

About

a better console diff

Resources

Stars

8 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages