https://github.com/zaquestion/gore
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
https://github.com/zaquestion/gore
Last synced: 5 months ago
JSON representation
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
- Host: GitHub
- URL: https://github.com/zaquestion/gore
- Owner: zaquestion
- License: mit
- Fork: true (x-motemen/gore)
- Created: 2015-12-08T05:30:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-08T05:45:18.000Z (over 10 years ago)
- Last Synced: 2024-06-20T13:40:40.397Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 488 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= gore image:https://travis-ci.org/motemen/gore.svg?branch=master["Build Status", link="https://travis-ci.org/motemen/gore"]
Yet another Go REPL that works nicely. Featured with line editing, code completion, and more.
image::doc/screencast.gif[Screencast]
_(Screencast taken with https://github.com/cho45/KeyCast[cho45/KeyCast])_
== Usage
gore
After a prompt is shown, enter any Go expressions/statements or commands described below.
To quit the session, type `Ctrl-D`.
== Features
* Line editing with history
* Multiline inputs
* Package importing with completion
* Evaluates any expressions or statements
* No "evaluated but not used"
* Code completion (requires https://github.com/nsf/gocode[gocode])
* Pretty printing (https://github.com/k0kubun/pp[pp] or https://github.com/davecgh/go-spew[spew] recommended)
* Showing documents (requires https://golang.org/x/tools/cmd/godoc[godoc])
* Auto-importing
== REPL Commands
Some functionalities are provided as colon-commands:
:import Import package
:print Show current source
:write [] Write out current source to file
:doc Show document (requires godoc)
:help List commands
:quit Quit the session
== Installation
gore uses Go toolchains, so I don't provide binaries.
go get -u github.com/motemen/gore
Make sure `$GOPATH/bin` is in your `$PATH`.
Also recommended:
go get -u github.com/nsf/gocode
go get -u github.com/k0kubun/pp # or github.com/davecgh/go-spew
go get -u golang.org/x/tools/cmd/godoc
== Caveats
* gore runs code using `go run` for each input. If you have entered time-consuming code,
gore will run it for each input and take some time.
== TODO
* Undoing input
* Configuration
* :write completion
* Direct editing of code
* Using external sources
* API
== License
link:./LICENSE[The MIT License].
== Author
motemen