Commit Graph

3718 Commits

Author SHA1 Message Date
Qi Xiao
6c4f100b83 README: Update Go version requirement. 2019-04-27 14:15:03 +01:00
Qi Xiao
ebb17d6662 eval: Add float64 for constructing float64 values. 2019-04-26 23:31:19 +01:00
Qi Xiao
321a74da70 eval/vals: In FromGo, keep float64 as is.
This addresses #816.
2019-04-26 23:29:20 +01:00
Qi Xiao
3927f7cf75 Add _tests/cli. 2019-04-26 23:20:21 +01:00
Qi Xiao
0ff21a8b32 eval/vals: Stringify float64 when concatenating.
This addresses #816.
2019-04-26 23:12:48 +01:00
Qi Xiao
d0f16aea3d eval/vals: ScanToGo supports passing float64 as-is.
This addresses #816.
2019-04-26 01:10:26 +01:00
Qi Xiao
26a0d172f7 cli/clicore: Add convinience functions for building App. 2019-04-25 22:13:49 +01:00
Qi Xiao
68af82a8fa styled: Unstyled -> Plain; add a MakeText helper. 2019-04-25 22:04:20 +01:00
Qi Xiao
2a12efed08 newedit/cli* -> cli/cli* 2019-04-25 21:33:17 +01:00
Qi Xiao
f2d661fc04 _testwin -> _tests/win_tty 2019-04-25 21:29:57 +01:00
Qi Xiao
16e04cca31 newedit/clicore: Change reference to Editor to App. 2019-04-25 09:46:04 +01:00
Qi Xiao
d4fb9e5ffb newedit/clicore: Editor -> App. 2019-04-25 09:43:41 +01:00
Qi Xiao
5151b4cbbf newedit/editutil -> newedit/cliutil. 2019-04-25 09:32:32 +01:00
Qi Xiao
eef1fd1540 newedit/types -> newedit/clitypes. 2019-04-25 09:31:19 +01:00
Qi Xiao
0e5341b8ce newedit/core -> newedit/clicore. 2019-04-25 09:25:03 +01:00
Qi Xiao
5eaec24f11 newedit: Implement a basic location mode. 2019-04-25 09:12:58 +01:00
Qi Xiao
5e41a4cd40 newedit/histlist: Cleanup. 2019-04-24 21:48:52 +01:00
Qi Xiao
b7f11e6816 _website: Fix Elvish codeblocks. 2019-04-24 20:38:12 +01:00
Qi Xiao
d1a47ec49a _website: Add examples for "if", and document the implicit logical and. 2019-04-24 20:36:06 +01:00
Qi Xiao
5291dae422 newedit: Implement histlist mode.
This addresses #778.
2019-04-22 23:39:51 +01:00
Qi Xiao
a46d854ab5 Provide a constructor for tty.KeyEvent.
And fix linter errors in newedit/listing by using this new constructor.
2019-04-20 17:34:59 +01:00
Qi Xiao
6eb319f661 newedit: Call st.AddCmd after readline. 2019-04-20 17:13:05 +01:00
Qi Xiao
a140f3e622 newedit: De-export BindingMap. 2019-04-20 16:09:01 +01:00
Qi Xiao
5adf29b15f newedit/editutil: In BasicHandler, only insert the character when the key is a character. 2019-04-19 23:02:44 +01:00
Qi Xiao
f798ef1e98 eval/vars: Clean up and add tests. 2019-04-19 19:44:11 +01:00
Qi Xiao
f5f49b746e eval/vals: Test iterate.go. 2019-04-19 18:48:45 +01:00
Qi Xiao
bbaa846638 Fix test on Unix. 2019-04-19 18:37:35 +01:00
Qi Xiao
89aa69d29d eval/vals: Consolidate the utility functions to build lists and maps. 2019-04-19 18:26:27 +01:00
Qi Xiao
135095881b eval/vals: Remove unused rat.go. 2019-04-19 18:05:34 +01:00
Qi Xiao
15aa823a2b eval/vals: Clean up pipe.go. 2019-04-19 18:05:19 +01:00
Qi Xiao
2541087217 eval/vals: Remove structs (superseded by structmaps). 2019-04-19 18:00:40 +01:00
Qi Xiao
9c55f2de48 eval/vals: Make Index of StructMaps use FromGo. 2019-04-19 17:58:55 +01:00
Qi Xiao
7d793e698b eval/vals: StructMap, an easy way to use Go structs as Elvish values.
Also add a lot of unit tests.
2019-04-19 17:41:07 +01:00
Qi Xiao
9368485f75 eval/vals: Rearrange some files. 2019-04-19 15:39:50 +01:00
Qi Xiao
33b8f73051 eval/vals: Make File an alias for *os.File. 2019-04-19 14:25:15 +01:00
Qi Xiao
c5e30e45e9 eval/vals: Add test for Concat. 2019-04-19 14:21:43 +01:00
Qi Xiao
8b3ca8bd02 eval/vals: Simplify the handling of lists and maps.
Also introduce type aliases List and Map to save some typing.
2019-04-19 12:24:45 +01:00
Qi Xiao
fe6fc5b89a eval/vals: Rearrange the switch clauses in the operation functions. 2019-04-19 01:03:56 +01:00
Qi Xiao
a0c53d4c40 eval: BuiltinFn -> GoFn. 2019-04-18 22:58:06 +01:00
Qi Xiao
c8e767b2fd eval: Fix lint errors. 2019-04-18 22:15:34 +01:00
Qi Xiao
a8a6c71fbd Eval: fix a lot of lint errors.
Also fixed the name of a test file, which was probably accidentally renamed.
2019-04-18 22:14:53 +01:00
Kenneth Shaw
72caaf7e8c Updating dependencies (#817)
Second half to PR #801, this updates to latest module dependencies.

Note: this pins golang.org/x/sys to an older version, as more recent
versions introduce a yet-to-be-determined bug on Darwin.
2019-04-17 23:14:32 +02:00
Qi Xiao
c4189114dd eval/vals: Implement ToString for float64, and add tests against ToString. 2019-04-17 21:09:27 +00:00
Qi Xiao
2ce05eb155 Basic support for float64 as an Elvish type. This addresses #816.
Float64 values are printed like (float64 42). However, the float64
builtin does not actually exist yet, and builtin math functions do not
accept float64 arguments either.

However, after this CL, from-json | to-json is now an identity operator.
Previously:

~> echo '[1]' | from-json | to-json
["1"]

Now:

~> echo '[1]' | from-json | to-json
[1]

It is also possible to use from-json to construct float64 values before
the float64 builtin is actually implemented.
2019-04-09 23:46:04 +01:00
Qi Xiao
4c804711c7 eval: Don't turn nil variables into ''. 2019-04-09 22:50:35 +01:00
Qi Xiao
64c939d7c4 Fix crash when using $nil.
This fixes #818.
2019-04-09 22:47:48 +01:00
Qi Xiao
4811ae619e eval: from-json converts JSON null to $nil. 2019-04-07 22:54:51 +01:00
Qi Xiao
f6bdd0e079 Introduce $nil as a valid value.
The value uses the Go nil as the underlying value.
2019-04-07 22:54:51 +01:00
Qi Xiao
e83bad4153 edit/history: Move utilities into subpackage. 2019-04-07 22:54:51 +01:00
Édouard Lopez
8907fdfbe1 Make installation script fish-compatible (#807) 2019-04-06 16:05:54 +01:00