e89fe48870
* Add compatibility test with old implementation * Add color type * Add basic style structs and utilities * Add structs for styled segments and texts * Add default style transformers to reimplement $edit:styled~ * Add builtins to manipulate styled segments and texts * Rename style 'underline' -> 'underlined' * Fix test case * Add conversion from styled text to ansi sequences * Return errors rather than throwing * Validate the type of boolean options * Delegate old to new styled function * Rebase for new test framework api and expand test cases * Remove old builtin function $edit:styled~ * Use strings to represent colors * Convert bool pointers to simple bool values * Validate color strings * Do no longer expose builtin style transformers * Fix confusion about pointers * Make outputs more stable * Expand tests * Use pointers instead of passing setter functions * Unexport and rename color check * Use the empty string for default colors * Expand tests * Simplify styled transformers Now there are three transformers for each boolean style attribute that allow setting, unsetting and toggling the corresponding attribute. * Rework and add doc comments |
||
---|---|---|
build | ||
daemon | ||
edit | ||
eval | ||
getopt | ||
glob | ||
parse | ||
program | ||
runtime | ||
store | ||
styled | ||
sys | ||
tt | ||
util | ||
vendor | ||
.appveyor.yml | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
.vsts.sh | ||
build-and-upload.elv | ||
CONTRIBUTING.md | ||
Dockerfile | ||
Gopkg.lock | ||
Gopkg.toml | ||
LICENSE | ||
main.go | ||
Makefile | ||
README.md |
Elvish: Friendly and Expressive Shell
Elvish is a cross-platform shell, supporting Linux, BSDs and Windows. It features an expressive programming language, with features like namespacing and anonymous functions, and a fully programmable user interface with friendly defaults. It is suitable for both interactive use and scripting.
... which is not 100% true yet. Elvish is already suitable for most daily interactive use, but it is neither complete nor stablized. Contributions are more than welcome!
This README documents the development aspect of Elvish. Other information is to be found on the website.
Building Elvish
To build Elvish, you need
-
Linux, {Free,Net,Open}BSD, macOS, or Windows (Windows support is experimental).
-
Go >= 1.8.
Once you have a suitable environment, simply build Elvish with go get
:
go get github.com/elves/elvish
The binary will be placed in $GOPATH/bin
. If you haven't configured a
GOPATH
, it defaults to ~/go
. Refer to How To Write Go
Code on how to set up workspace for Go.
Users of macOS can also build Elvish using Homebrew:
brew install --HEAD elvish
Contributing
See CONTRIBUTING.md.
Name
In roguelikes, items made by the elves have a reputation of high quality. These are usually called elven items, but I chose "elvish" because it ends with "sh", a long tradition of Unix shells. It also rhymes with fish, one of the shells that influenced the philosophy of Elvish.
The word "Elvish" should be capitalized like a proper noun. However, when referring to the elvish
command, use it in lower case with fixed-width font.
Whoever practices the Elvish way by either contributing to it or simply using it is called an Elf. (You might have guessed this from the name of the GitHub organization.) The official adjective for Elvish (as in "Pythonic" for Python, "Rubyesque" for Ruby) is Elven.