summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-09-19 20:22:36 +1000
committerGitHub <noreply@github.com>2018-09-19 20:22:36 +1000
commit7b90d2496b56d89863b552b226f45b8de2bd1551 (patch)
tree7bc9c833b690690fd526a4933bf48f00ef54c539
parent3072c93e131152d3898ff1e98cc7999c79ecd195 (diff)
parent0367399cf3368c6e05b9187ac8a9c994eaf2fc9c (diff)
Merge pull request #294 from jesseduffield/feature/recent-repos
Recent Repos Menu
-rw-r--r--Gopkg.lock20
-rw-r--r--go.mod4
-rw-r--r--go.sum54
-rw-r--r--pkg/app/app.go4
-rw-r--r--pkg/gui/gui.go8
-rw-r--r--pkg/gui/keybindings.go7
-rw-r--r--pkg/gui/options_menu_panel.go6
-rw-r--r--pkg/gui/recent_repos_panel.go69
-rw-r--r--pkg/i18n/english.go3
-rw-r--r--vendor/github.com/jesseduffield/gocui/attribute.go2
-rw-r--r--vendor/github.com/jesseduffield/gocui/gui.go2
-rw-r--r--vendor/github.com/jesseduffield/gocui/keybinding.go2
-rw-r--r--vendor/github.com/jesseduffield/gocui/view.go6
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/AUTHORS (renamed from vendor/github.com/nsf/termbox-go/AUTHORS)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/LICENSE (renamed from vendor/github.com/nsf/termbox-go/LICENSE)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/api.go (renamed from vendor/github.com/nsf/termbox-go/api.go)9
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/api_common.go (renamed from vendor/github.com/nsf/termbox-go/api_common.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/api_windows.go (renamed from vendor/github.com/nsf/termbox-go/api_windows.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/escwait.go (renamed from vendor/github.com/nsf/termbox-go/escwait.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/escwait_darwin.go (renamed from vendor/github.com/nsf/termbox-go/escwait_darwin.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls.go (renamed from vendor/github.com/nsf/termbox-go/syscalls.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_darwin.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_darwin.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_darwin_amd64.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_dragonfly.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_freebsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_freebsd.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_linux.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_linux.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_netbsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_netbsd.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_openbsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_openbsd.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/syscalls_windows.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_windows.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/termbox.go (renamed from vendor/github.com/nsf/termbox-go/termbox.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/termbox_common.go (renamed from vendor/github.com/nsf/termbox-go/termbox_common.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/termbox_windows.go (renamed from vendor/github.com/nsf/termbox-go/termbox_windows.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/terminfo.go (renamed from vendor/github.com/nsf/termbox-go/terminfo.go)0
-rw-r--r--vendor/github.com/jesseduffield/termbox-go/terminfo_builtin.go (renamed from vendor/github.com/nsf/termbox-go/terminfo_builtin.go)0
34 files changed, 126 insertions, 70 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index 2bbaa2118..540b26052 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -189,11 +189,19 @@
[[projects]]
branch = "master"
- digest = "1:71e6c15797951d3fabaa944d70253e36a6cee96bf54ca0bc43ca3de3b4814bbb"
+ digest = "1:d6df25dee1274e63c25f84c257bc504359f975dedb791eec7a5b51992146bb76"
name = "github.com/jesseduffield/gocui"
packages = ["."]
pruneopts = "NUT"
- revision = "2cb6e95bbbf850bb32cc1799e07d08ff0f144746"
+ revision = "4fca348422d8b6136e801b222858204a35ee369a"
+
+[[projects]]
+ branch = "master"
+ digest = "1:3ab130f65766f5b7cc944d557df31c6a007ec017151705ec1e1b8719f2689021"
+ name = "github.com/jesseduffield/termbox-go"
+ packages = ["."]
+ pruneopts = "NUT"
+ revision = "1e272ff78dcb4c448870f464fda1cdcf2bf0b3dd"
[[projects]]
digest = "1:ac6d01547ec4f7f673311b4663909269bfb8249952de3279799289467837c3cc"
@@ -295,14 +303,6 @@
version = "v2.0.0-beta.5"
[[projects]]
- branch = "master"
- digest = "1:34d9354c2c5d916c05864327553047df59fc10e86ff1f408e4136eba0a25a5ec"
- name = "github.com/nsf/termbox-go"
- packages = ["."]
- pruneopts = "NUT"
- revision = "5c94acc5e6eb520f1bcd183974e01171cc4c23b3"
-
-[[projects]]
digest = "1:cf254277d898b713195cc6b4a3fac8bf738b9f1121625df27843b52b267eec6c"
name = "github.com/pelletier/go-buffruneio"
packages = ["."]
diff --git a/go.mod b/go.mod
index 02db8a03e..61692f46e 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,8 @@ require (
github.com/heroku/rollrus v0.0.0-20180515183152-fc0cef2ff331
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
github.com/jesseduffield/go-getter v0.0.0-20180822080847-906e15686e63
- github.com/jesseduffield/gocui v0.0.0-20180905104005-2cb6e95bbbf8
+ github.com/jesseduffield/gocui v0.0.0-20180919095827-4fca348422d8
+ github.com/jesseduffield/termbox-go v0.0.0-20180919093808-1e272ff78dcb
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1
github.com/kevinburke/ssh_config v0.0.0-20180317175531-9fc7bb800b55
@@ -31,7 +32,6 @@ require (
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77
github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699
github.com/nicksnyder/go-i18n v0.0.0-20180803040939-a16b91a3ba80
- github.com/nsf/termbox-go v0.0.0-20180613055208-5c94acc5e6eb
github.com/pelletier/go-buffruneio v0.2.0
github.com/pelletier/go-toml v1.2.0
github.com/pkg/errors v0.8.0
diff --git a/go.sum b/go.sum
index e1d3249fa..1506becb9 100644
--- a/go.sum
+++ b/go.sum
@@ -1,38 +1,22 @@
-github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY=
github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
-github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
-github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
-github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/aws/aws-sdk-go v1.15.21 h1:STLvc6RrpycslC1NRtTvt/YSgDkIGCTrB9K9vE5R2oQ=
github.com/aws/aws-sdk-go v1.15.21/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1UJrqV3uuy861HCTo708pDMbjHHdCas=
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 h1:tuijfIjZyjZaHq9xDUh0tNitwXshJpbLkqMOJv4H3do=
github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21/go.mod h1:po7NpZ/QiTKzBKyrsEAxwnTamCoh8uDk/egRpQ7siIc=
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emirpasic/gods v1.9.0 h1:rUF4PuzEjMChMiNsVjdI+SyLu7rEqpQ5reNFnhC7oFo=
github.com/emirpasic/gods v1.9.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
-github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
-github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/gliderlabs/ssh v0.1.1 h1:j3L6gSLQalDETeEg/Jg0mGY0/y/N6zI2xX1978P0Uqw=
-github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-ini/ini v1.38.2 h1:6Hl/z3p3iFkA0dlDfzYxuFuUGD+kaweypF6btsR2/Q4=
github.com/go-ini/ini v1.38.2/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 h1:zN2lZNZRflqFyxVaTIU61KNKQ9C0055u9CAfpmqUvo4=
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3/go.mod h1:nPpo7qLxd6XL3hWJG/O60sR8ZKfMCiIoNap5GvD12KU=
-github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
-github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
-github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw=
-github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/hashicorp/go-cleanhttp v0.0.0-20171218145408-d5fe4b57a186 h1:URgjUo+bs1KwatoNbwG0uCO4dHN4r1jsp4a5AGgHRjo=
github.com/hashicorp/go-cleanhttp v0.0.0-20171218145408-d5fe4b57a186/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-getter v0.0.0-20180809191950-4bda8fa99001 h1:MFPzqpPED05pFyGjNPJEC2sXM6EHTzFyvX+0s0JoZ48=
@@ -45,18 +29,16 @@ github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce h1:xdsDDbiBDQTKASoGE
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w=
github.com/heroku/rollrus v0.0.0-20180515183152-fc0cef2ff331 h1:qio0y/sQdhbHRA3cmgczo04MaSV2zw+n46G1owvgWIk=
github.com/heroku/rollrus v0.0.0-20180515183152-fc0cef2ff331/go.mod h1:BT+PgT529opmb6mcUY+Fg0IwVRRmwqFyavEMU17GnBg=
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jesseduffield/go-getter v0.0.0-20180822080847-906e15686e63 h1:Nrr/yUxNjXWYK0B3IqcFlYh1ICnesJDB4ogcfOVc5Ns=
github.com/jesseduffield/go-getter v0.0.0-20180822080847-906e15686e63/go.mod h1:fNqjRf+4XnTo2PrGN1JRb79b/BeoHwP4lU00f39SQY0=
-github.com/jesseduffield/gocui v0.0.0-20180905104005-2cb6e95bbbf8 h1:YMYnpIu5HUJfx/yfIwnZhFrgWTg51FQWtvZi+PMzQm8=
-github.com/jesseduffield/gocui v0.0.0-20180905104005-2cb6e95bbbf8/go.mod h1:2RtZznzYKt8RLRwvFiSkXjU0Ei8WwHdubgnlaYH47dw=
+github.com/jesseduffield/gocui v0.0.0-20180919095827-4fca348422d8 h1:XxX+IqNOFDh1PnU4eZDzUomoKbuKCvwyEm5an/IxLQU=
+github.com/jesseduffield/gocui v0.0.0-20180919095827-4fca348422d8/go.mod h1:2RtZznzYKt8RLRwvFiSkXjU0Ei8WwHdubgnlaYH47dw=
+github.com/jesseduffield/termbox-go v0.0.0-20180919093808-1e272ff78dcb h1:cFHYEWpQEfzFZVKiKZytCUX4UwQixKSw0kd3WhluPsY=
+github.com/jesseduffield/termbox-go v0.0.0-20180919093808-1e272ff78dcb/go.mod h1:anMibpZtqNxjDbxrcDEAwSdaJ37vyUeM1f/M4uekib4=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
-github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 h1:PJPDf8OUfOK1bb/NeTKd4f1QXZItOX389VN3B6qC8ro=
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/kevinburke/ssh_config v0.0.0-20180317175531-9fc7bb800b55 h1:S38dC4mEwxdw/U41+97VWdbun8mTcTjwg5Ujfg8QPME=
@@ -77,22 +59,16 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 h1:
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699 h1:KXZJFdun9knAVAR8tg/aHJEr5DgtcbqyvzacK+CDCaI=
github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
+github.com/nicksnyder/go-i18n v0.0.0-20180803040939-a16b91a3ba80 h1:7ory6RlsEkeK89iyV7Imz3sVz8YHeSw29w3PehpCWC0=
github.com/nicksnyder/go-i18n v0.0.0-20180803040939-a16b91a3ba80/go.mod h1:e4Di5xjP9oTVrC6y3C7C0HoSYXjSbhh/dU0eUV32nB4=
github.com/nicksnyder/go-i18n/v2 v2.0.0-beta.5 h1:/TjjTS4kg7vC+05gD0LE4+97f/+PRFICnK/7wJPk7kE=
github.com/nicksnyder/go-i18n/v2 v2.0.0-beta.5/go.mod h1:4Opqa6/HIv0lhG3WRAkqzO0afezkRhxXI0P8EJkqeRU=
-github.com/nsf/termbox-go v0.0.0-20180613055208-5c94acc5e6eb h1:YahEjAGkJtCrkqgVHhX6n8ZX+CZ3hDRL9fjLYugLfSs=
-github.com/nsf/termbox-go v0.0.0-20180613055208-5c94acc5e6eb/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
-github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/gomega v1.4.1 h1:PZSj/UFNaVp3KxrzHOcS7oyuWA7LoOY/77yCTEFu21U=
-github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/pelletier/go-buffruneio v0.2.0 h1:U4t4R6YkofJ5xHm3dJzuRpPZ0mr5MMCoAWooScCR7aA=
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
@@ -100,10 +76,6 @@ github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 h1:Xuk8ma/ibJ1
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0/go.mod h1:7AwjWCpdPhkSmNAgUv5C7EJ4AbmjEB3r047r3DXWu3Y=
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
-github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co=
-github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
-github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/spf13/afero v1.1.1 h1:Lt3ihYMlE+lreX1GS4Qw4ZsNpYQLxIXKBTEOXm3nt6I=
github.com/spf13/afero v1.1.1/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg=
@@ -118,7 +90,6 @@ github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad h1:fiWzISvDn0Csy5H0iwgAuJ
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
github.com/src-d/gcfg v1.3.0 h1:2BEDr8r0I0b8h/fOqwtxCEiq2HJu8n2JGZJQFGXWLjg=
github.com/src-d/gcfg v1.3.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
-github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stvp/roll v0.0.0-20170522205222-3627a5cbeaea h1:jysxIKov/4GJ33wI2aRvuIK7yBwB28E5almlgDLPRpM=
github.com/stvp/roll v0.0.0-20170522205222-3627a5cbeaea/go.mod h1:Ffmqrj3nXIMIjeA4uW3Qjj0Ud9eDoTG0fu4JxyAr/tE=
@@ -132,31 +103,16 @@ golang.org/x/crypto v0.0.0-20180808211826-de0752318171 h1:vYogbvSFj2YXcjQxFHu/rA
golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E=
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0 h1:8H8QZJ30plJyIVj60H3lr8TZGIq2Fh3Cyrs/ZNg1foU=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.0.0-20171214130843-f21a4dfb5e38/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo=
-gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0=
-gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
-gopkg.in/ini.v1 v1.38.2 h1:dGcbywv4RufeGeiMycPT/plKB5FtmLKLnWKwBiLhUA4=
-gopkg.in/ini.v1 v1.38.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/src-d/go-billy.v4 v4.2.0 h1:VGbrP1EsYxtvVPEiHui+4//imr4E5MGEFLx66bQtusg=
gopkg.in/src-d/go-billy.v4 v4.2.0/go.mod h1:ZHSF0JP+7oD97194otDUCD7Ofbk63+xFcfWP5bT6h+Q=
-gopkg.in/src-d/go-git-fixtures.v3 v3.1.1 h1:XWW/s5W18RaJpmo1l0IYGqXKuJITWRFuA45iOf1dKJs=
-gopkg.in/src-d/go-git-fixtures.v3 v3.1.1/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g=
gopkg.in/src-d/go-git.v4 v4.0.0-20180807092216-43d17e14b714 h1:+wM2BGgQ1znCKBexOB4OrGVSDw8mtKNUSq3wqxZhi/k=
gopkg.in/src-d/go-git.v4 v4.0.0-20180807092216-43d17e14b714/go.mod h1:CzbUWqMn4pvmvndg3gnh5iZFmSsbhyhUWdI0IQ60AQo=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
diff --git a/pkg/app/app.go b/pkg/app/app.go
index b03ec5b42..65acd2e35 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -77,11 +77,11 @@ func Setup(config config.AppConfigurer) (*App, error) {
app.Tr = i18n.NewLocalizer(app.Log)
- app.GitCommand, err = commands.NewGitCommand(app.Log, app.OSCommand, app.Tr)
+ app.Updater, err = updates.NewUpdater(app.Log, config, app.OSCommand, app.Tr)
if err != nil {
return app, err
}
- app.Updater, err = updates.NewUpdater(app.Log, config, app.OSCommand, app.Tr)
+ app.GitCommand, err = commands.NewGitCommand(app.Log, app.OSCommand, app.Tr)
if err != nil {
return app, err
}
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index 8a2aaea81..7e7648cfe 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -33,6 +33,7 @@ var OverlappingEdges = false
type SentinelErrors struct {
ErrSubProcess error
ErrNoFiles error
+ ErrSwitchRepo error
}
// GenerateSentinelErrors makes the sentinel errors for the gui. We're defining it here
@@ -49,6 +50,7 @@ func (gui *Gui) GenerateSentinelErrors() {
gui.Errors = SentinelErrors{
ErrSubProcess: errors.New(gui.Tr.SLocalize("RunningSubprocess")),
ErrNoFiles: errors.New(gui.Tr.SLocalize("NoChangedFiles")),
+ ErrSwitchRepo: errors.New("switching repo"),
}
}
@@ -292,6 +294,10 @@ func (gui *Gui) layout(g *gocui.Gui) error {
// these are only called once (it's a place to put all the things you want
// to happen on startup after the screen is first rendered)
gui.Updater.CheckForNewUpdate(gui.onBackgroundUpdateCheckFinish, false)
+ if err := gui.updateRecentRepoList(); err != nil {
+ return err
+ }
+
gui.handleFileSelect(g, filesView)
gui.refreshFiles(g)
gui.refreshBranches(g)
@@ -400,6 +406,8 @@ func (gui *Gui) RunWithSubprocesses() {
if err := gui.Run(); err != nil {
if err == gocui.ErrQuit {
break
+ } else if err == gui.Errors.ErrSwitchRepo {
+ continue
} else if err == gui.Errors.ErrSubProcess {
gui.SubProcess.Stdin = os.Stdin
gui.SubProcess.Stdout = os.Stdout
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 72a187472..1073da68a 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -113,6 +113,13 @@ func (gui *Gui) GetKeybindings() []*Binding {
Handler: gui.handleCheckForUpdate,
Description: gui.Tr.SLocalize("checkForUpdate"),
}, {
+ ViewName: "status",
+ Key: 's',
+ Modifier: gocui.ModNone,
+ Handler: gui.handleCreateRecentReposMenu,
+ Description: gui.Tr.SLocalize("SwitchRepo"),
+ },
+ {
ViewName: "files",
Key: 'c',
Modifier: gocui.ModNone,
diff --git a/pkg/gui/options_menu_panel.go b/pkg/gui/options_menu_panel.go
index 2da002b43..ac01ad03d 100644
--- a/pkg/gui/options_menu_panel.go
+++ b/pkg/gui/options_menu_panel.go
@@ -33,11 +33,11 @@ func (gui *Gui) getBindings(v *gocui.View) []*Binding {
func (gui *Gui) handleCreateOptionsMenu(g *gocui.Gui, v *gocui.View) error {
bindings := gui.getBindings(v)
- handleOptionsMenuPress := func(index int) error {
+ handleMenuPress := func(index int) error {
if bindings[index].Key == nil {
return nil
}
- if index <= len(bindings) {
+ if index >= len(bindings) {
return errors.New("Index is greater than size of bindings")
}
err := gui.handleMenuClose(g, v)
@@ -47,5 +47,5 @@ func (gui *Gui) handleCreateOptionsMenu(g *gocui.Gui, v *gocui.View) error {
return bindings[index].Handler(g, v)
}
- return gui.createMenu(bindings, handleOptionsMenuPress)
+ return gui.createMenu(bindings, handleMenuPress)
}
diff --git a/pkg/gui/recent_repos_panel.go b/pkg/gui/recent_repos_panel.go
new file mode 100644
index 000000000..add987b32
--- /dev/null
+++ b/pkg/gui/recent_repos_panel.go
@@ -0,0 +1,69 @@
+package gui
+
+import (
+ "os"
+ "path/filepath"
+
+ "github.com/fatih/color"
+ "github.com/jesseduffield/gocui"
+ "github.com/jesseduffield/lazygit/pkg/commands"
+ "github.com/jesseduffield/lazygit/pkg/utils"
+)
+
+type recentRepo struct {
+ path string
+}
+
+func (r *recentRepo) GetDisplayStrings() []string {
+ yellow := color.New(color.FgMagenta)
+ base := filepath.Base(r.path)
+ path := yellow.Sprint(r.path)
+ return []string{base, path}
+}
+
+func (gui *Gui) handleCreateRecentReposMenu(g *gocui.Gui, v *gocui.View) error {
+ recentRepoPaths := gui.Config.GetAppState().RecentRepos
+ reposCount := utils.Min(len(recentRepoPaths), 20)
+ // we won't show the current repo hence the -1
+ recentRepos := make([]*recentRepo, reposCount-1)
+ for i, path := range recentRepoPaths[1:reposCount] {
+ recentRepos[i] = &recentRepo{path: path}
+ }
+
+ handleMenuPress := func(index int) error {
+ repo := recentRepos[index]
+ if err := os.Chdir(repo.path); err != nil {
+ return err
+ }
+ newGitCommand, err := commands.NewGitCommand(gui.Log, gui.OSCommand, gui.Tr)
+ if err != nil {
+ return err
+ }
+ gui.GitCommand = newGitCommand
+ return gui.Errors.ErrSwitchRepo
+ }
+
+ return gui.createMenu(recentRepos, handleMenuPress)
+}
+
+// updateRecentRepoList registers the fact that we opened lazygit in this repo,
+// so that we can open the same repo via the 'recent repos' menu
+func (gui *Gui) updateRecentRepoList() error {
+ recentRepos := gui.Config.GetAppState().RecentRepos
+ currentRepo, err := os.Getwd()
+ if err != nil {
+ return err
+ }
+ gui.Config.GetAppState().RecentRepos = newRecentReposList(recentRepos, currentRepo)
+ return gui.Config.SaveAppState()
+}
+
+func newRecentReposList(recentRepos []string, currentRepo string) []string {
+ newRepos := []string{currentRepo}
+ for _, repo := range recentRepos {
+ if repo != currentRepo {
+ newRepos = append(newRepos, repo)
+ }
+ }
+ return newRepos
+}
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index 4f009c075..b8be4cfc6 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -390,6 +390,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "ConfirmQuit",
Other: `Are you sure you want to quit?`,
+ }, &i18n.Message{
+ ID: "SwitchRepo",
+ Other: `switch to a recent repo`,
},
)
}
diff --git a/vendor/github.com/jesseduffield/gocui/attribute.go b/vendor/github.com/jesseduffield/gocui/attribute.go
index bad758a1d..5b46b1427 100644
--- a/vendor/github.com/jesseduffield/gocui/attribute.go
+++ b/vendor/github.com/jesseduffield/gocui/attribute.go
@@ -4,7 +4,7 @@
package gocui
-import "github.com/nsf/termbox-go"
+import "github.com/jesseduffield/termbox-go"
// Attribute represents a terminal attribute, like color, font style, etc. They
// can be combined using bitwise OR (|). Note that it is not possible to
diff --git a/vendor/github.com/jesseduffield/gocui/gui.go b/vendor/github.com/jesseduffield/gocui/gui.go
index 4393c06c4..cb163e06d 100644
--- a/vendor/github.com/jesseduffield/gocui/gui.go
+++ b/vendor/github.com/jesseduffield/gocui/gui.go
@@ -7,7 +7,7 @@ package gocui
import (
"errors"
- "github.com/nsf/termbox-go"
+ "github.com/jesseduffield/termbox-go"
)
var (
diff --git a/vendor/github.com/jesseduffield/gocui/keybinding.go b/vendor/github.com/jesseduffield/gocui/keybinding.go
index 82d1acc9f..65d9ec6cf 100644
--- a/vendor/github.com/jesseduffield/gocui/keybinding.go
+++ b/vendor/github.com/jesseduffield/gocui/keybinding.go
@@ -4,7 +4,7 @@
package gocui
-import "github.com/nsf/termbox-go"
+import "github.com/jesseduffield/termbox-go"
// Keybidings are used to link a given key-press event with a handler.
type keybinding struct {
diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go
index 53ab06f8c..46b86ec2a 100644
--- a/vendor/github.com/jesseduffield/gocui/view.go
+++ b/vendor/github.com/jesseduffield/gocui/view.go
@@ -10,8 +10,8 @@ import (
"io"
"strings"
+ "github.com/jesseduffield/termbox-go"
"github.com/mattn/go-runewidth"
- "github.com/nsf/termbox-go"
)
// Constants for overlapping edges
@@ -447,6 +447,10 @@ func (v *View) ViewBufferLines() []string {
return lines
}
+func (v *View) ViewLinesHeight() int {
+ return len(v.viewLines)
+}
+
// ViewBuffer returns a string with the contents of the view's buffer that is
// shown to the user.
func (v *View) ViewBuffer() string {
diff --git a/vendor/github.com/nsf/termbox-go/AUTHORS b/vendor/github.com/jesseduffield/termbox-go/AUTHORS
index fe26fb0fb..fe26fb0fb 100644
--- a/vendor/github.com/nsf/termbox-go/AUTHORS
+++ b/vendor/github.com/jesseduffield/termbox-go/AUTHORS
diff --git a/vendor/github.com/nsf/termbox-go/LICENSE b/vendor/github.com/jesseduffield/termbox-go/LICENSE
index d9bc068ce..d9bc068ce 100644
--- a/vendor/github.com/nsf/termbox-go/LICENSE
+++ b/vendor/github.com/jesseduffield/termbox-go/LICENSE
diff --git a/vendor/github.com/nsf/termbox-go/api.go b/vendor/github.com/jesseduffield/termbox-go/api.go
index d530ab5c5..4c828e482 100644
--- a/vendor/github.com/nsf/termbox-go/api.go
+++ b/vendor/github.com/jesseduffield/termbox-go/api.go
@@ -317,6 +317,9 @@ func PollEvent() Event {
event.Type = EventKey
status := extract_event(inbuf, &event, true)
if event.N != 0 {
+ if event.N > len(inbuf) {
+ event.N = len(inbuf)
+ }
copy(inbuf, inbuf[event.N:])
inbuf = inbuf[:len(inbuf)-event.N]
}
@@ -345,6 +348,9 @@ func PollEvent() Event {
input_comm <- ev
status :=