Commit Graph

638 Commits

Author SHA1 Message Date
Qi Xiao
44ebc91874 Change EvalCtx.evaling to take begin and end positions. 2016-03-19 01:35:37 +01:00
Qi Xiao
07c9adc310 In ExternalCmd.Call, don't loop forever after input channel gets closed. 2016-03-18 19:07:07 +01:00
Qi Xiao
80254b83f8 Add a new file type. 2016-03-18 01:10:37 +01:00
Qi Xiao
785aa20fc2 Slightly prettier Repr of closure. 2016-03-18 01:03:33 +01:00
Qi Xiao
d474ec3bc0 Seed with current time at startup. 2016-03-17 15:30:15 +01:00
Qi Xiao
2c78e210a8 Add builtin rand and randint. 2016-03-17 15:28:00 +01:00
Qi Xiao
d5d5bd7650 When calling ExternalCmd, discard all channel inputs.
This fixes #156.
2016-03-17 12:32:48 +01:00
Qi Xiao
fdaa61bc43 Comments and message strings. 2016-03-16 20:51:03 +01:00
Qi Xiao
079e835495 Most builtins using chan input now accepts byte pipe input as well.
This addresses #156.
2016-03-16 18:30:36 +01:00
Qi Xiao
0b1118f870 Add an ord builtin. 2016-03-14 17:50:20 +01:00
Qi Xiao
9cebb5b1a4 Add a % builtin. 2016-03-13 04:12:23 +01:00
Qi Xiao
5ef87a7e7a Add a "bool" builtin. 2016-03-10 20:48:59 +01:00
Qi Xiao
4c938c7393 Support positional variables like $0 and $-1.
This fixes #159.
2016-03-10 20:42:32 +01:00
Qi Xiao
7a74bb9b12 Add a "to-json" builtin. 2016-03-10 16:37:36 +01:00
Qi Xiao
e2122bd142 fix fix 2016-03-08 19:03:57 +01:00
Qi Xiao
69be6f4631 The equality builtin is now "==" instead of "=". 2016-03-08 18:51:24 +01:00
Qi Xiao
9eb414a9ba Let != take exactly two arguments. 2016-03-08 18:49:52 +01:00
Qi Xiao
f061c8e4c2 Fix eawk's delimiter. 2016-03-08 13:12:44 +01:00
Qi Xiao
2951307556 Add builtins != and rest; allow ! in barewords. 2016-03-08 03:01:30 +01:00
Qi Xiao
345d679e5c Channel outputs are no longer pretty-printed.
There is now a "pprint" builtin that pretty-prints.
2016-03-08 02:23:49 +01:00
Qi Xiao
1638370417 [a b;c d] desugars to [[a b] [c d]] 2016-03-08 02:01:58 +01:00
Qi Xiao
cd8ca4f851 Ditch each-line in favor of "eawk". 2016-03-06 21:15:43 +01:00
Qi Xiao
4353d12bbe Have each-line treat delimiter as regular expression. 2016-03-06 20:25:47 +01:00
Qi Xiao
4ba69d38c5 Change each-line to take a delimiter as the first arg. 2016-03-06 20:18:53 +01:00
Qi Xiao
79f74cf096 New builtin each-line.
Now there is an awk in elvish.
2016-03-06 20:05:05 +01:00
Qi Xiao
84a0012b38 Use underscores in filenames. 2016-03-06 19:46:38 +01:00
Qi Xiao
1895a37073 Lots of renames. 2016-03-02 01:35:13 +01:00
Qi Xiao
68f76a44f9 Add a "history" builtin to query command history.
This fixes #48.
2016-02-29 20:17:27 +01:00
Qi Xiao
c13cc9f8a4 Remove the jump builtin.
The functionality is now provided by the location mode.
2016-02-29 20:00:02 +01:00
Qi Xiao
c4254581c6 Going by location mode also increases score, but lower. 2016-02-29 19:22:17 +01:00
Qi Xiao
4ff73e3aeb eval: Add a "pow" builtin. 2016-02-29 19:01:41 +01:00
Qi Xiao
868de88e05 Make builtin namespace separate from the global one. 2016-02-27 23:56:12 +01:00
Qi Xiao
3fb9602764 Make the builtin namespace a fixed global. 2016-02-27 23:43:54 +01:00
Qi Xiao
92fb6e5161 Support shared variable.
This fixes #15. Only string is supported ATM.
2016-02-26 04:05:47 +01:00
Qi Xiao
cec194c537 Fix a comment. 2016-02-26 02:57:36 +01:00
Qi Xiao
00290a6f2b Implement rest arg for function.
This fixes #83.
2016-02-26 01:54:27 +01:00
Qi Xiao
9f4a6413c1 Support variadic assignment.
This fixes #84.
2016-02-26 01:10:16 +01:00
Qi Xiao
cee81d5298 eval: VariablesOp -> LValueOp 2016-02-25 15:53:55 +01:00
Qi Xiao
35f5798bcd Add a newline before the final ] when pretty-printing lists and maps. 2016-02-25 00:35:47 +01:00
Qi Xiao
6b625c0e8d New builtin "tilde-abbr". 2016-02-23 13:29:10 +01:00
Qi Xiao
9d7e5de667 edit: Add a Prompt interface, going to support customizable prompt. 2016-02-23 13:08:41 +01:00
Qi Xiao
6a80c3dcef Only use stub when it is alive. 2016-02-23 12:33:32 +01:00
Qi Xiao
cea7d7675c Implement an "all" modifier for wildcards; fix tests. 2016-02-23 02:45:35 +01:00
Qi Xiao
ce96ee1489 glob: Wildcards after / no longer match dot. 2016-02-23 02:34:20 +01:00
Qi Xiao
348306ceb4 Revert accidentally commited code when Fixing typo in README.
This reverts commit 98f02a01b5.
2016-02-23 01:09:48 +01:00
Qi Xiao
98f02a01b5 Fix typo in README. 2016-02-23 01:07:28 +01:00
Qi Xiao
3a237c3a4f Temporarily fix the builtin namespace. 2016-02-23 00:10:00 +01:00
Qi Xiao
60ea1ffb35 Add logging; don't relay signal from stub after seeing EOF. 2016-02-22 23:06:00 +01:00
Qi Xiao
e6c44bdbdd Terminate the stub before -exec. 2016-02-22 23:00:33 +01:00
Qi Xiao
6fbadd6f31 Add a builtin namespace. Now this is really Pythonic.
The "acme" builtin module finally works.
2016-02-22 22:56:23 +01:00