Commit Graph

599 Commits

Author SHA1 Message Date
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
Qi Xiao
657448acf3 Update working directory of elvish-stub. 2016-02-22 18:42:25 +01:00
Qi Xiao
158b4b82a5 eval: Log instead of write signals. 2016-02-22 18:30:21 +01:00
Qi Xiao
0cac402263 eval: Teach (*muster).error correct English 2016-02-22 18:23:12 +01:00
Qi Xiao
0d3d44f097 eval: Fix (*muster).error 2016-02-22 18:20:43 +01:00
Qi Xiao
940dc16bb1 Try to respond to signals sent to elvish-stub.
Doesn't always work, but the behavior is consistent in a session (if it works,
then it works in this session; vice versa). Likely some race in startup code.
2016-02-22 17:40:17 +01:00
Qi Xiao
4d567f406f Fix ~/* in a pretty hacky way.
This fixes #134.
2016-02-22 16:05:14 +01:00
Qi Xiao
54e6b83fcd Clean up namespace resolution code. 2016-02-22 15:35:32 +01:00
Qi Xiao
6aa13a9fb8 Fix name resolution. 2016-02-22 15:32:49 +01:00
Qi Xiao
c3455d9a1c Add "e" ns as yet another alias of "external". 2016-02-22 15:26:16 +01:00
Qi Xiao
a3ae232585 Fix resolution of unqualified names. 2016-02-22 15:25:48 +01:00
Qi Xiao
01c5977a8f Use "external:" namespace to make external commands.
Namespace code has also been cleaned up a bit.
2016-02-22 15:22:00 +01:00
Qi Xiao
9793da932c Add a "base" builtin. 2016-02-22 02:28:28 +01:00
Qi Xiao
5bbb8bef13 Fix stuttering of cnf error. 2016-02-22 00:06:26 +01:00
Qi Xiao
519760107f eval: Fix go:generate line. 2016-02-22 00:06:25 +01:00
Qi Xiao
ff6a2d025a Fix failing tests. 2016-02-21 23:59:44 +01:00
Qi Xiao
f77fd16a6c Add a pretty clumsy fg builtin.
Let's pretend that this fixes #12.
2016-02-21 23:45:49 +01:00
Qi Xiao
bda9ec2483 eval: Add ExternalCmdExit. 2016-02-21 23:16:12 +01:00
Qi Xiao
19a0094bb8 eval/externalcmd.go: Remove case ws.Continued. 2016-02-21 23:03:48 +01:00
Qi Xiao
2108002356 When calling external command, wait for stopped process as well. 2016-02-21 23:01:30 +01:00
Qi Xiao
7839884b13 Autoload modules.
This fixes #135.
2016-02-21 20:10:33 +01:00
Qi Xiao
edc901b99f Fix broken test. 2016-02-21 18:28:19 +00:00
Qi Xiao
b154de33ab Always wait for programs to exit.
This fixes #137.
2016-02-21 18:25:49 +00:00
Qi Xiao
00e90c3473 Put forked processes in fg and elvish in bg.
This addresses #12.
2016-02-21 17:01:48 +01:00
Qi Xiao
ff76359063 Add stub to Evaler; don't flood the terminal when I/O error occurs. 2016-02-21 16:26:16 +01:00
Qi Xiao
d2d119af7f Move functionality of edit/search.go to util. 2016-02-21 14:32:13 +01:00
Qi Xiao
d76bb34592 eval: Restructure assignment code. 2016-02-21 13:03:13 +01:00
Qi Xiao
160e1456d3 Add $pwd. 2016-02-21 12:58:20 +01:00
Qi Xiao
f001c783d5 Lock EnvPathList correctly. This fixes #146.
Although there are no explicit writes to $paths in the test cases, there is
one hidden write: when the first search on external commands is done. Since
the internal cache of EnvPathList starts empty, EnvPathList.get() notices that
it needs to fetch the environment to update itself. However, the update first
modifies .cachedValue and then .cachedPaths. If another goroutine uses .get()
in the middle, it would think that the cache is actually up to date and uses
the outdated .cachedPaths, which is empty.

EnvPathList.get() is now correctly guarded by a write lock. The offending test
case has been uncommented as well.
2016-02-20 22:25:26 +01:00
Qi Xiao
bb1e5954f2 eval: Make OS X's mktemp happy. 2016-02-20 22:11:34 +01:00
Qi Xiao
08eff35cab eval: Add tests; comment out a failing test. 2016-02-20 22:05:20 +01:00
Qi Xiao
38874f6348 eval: Remove commented tests. 2016-02-20 21:47:30 +01:00
Qi Xiao
4d060c3ea7 eval: Add tests. 2016-02-20 21:43:25 +01:00
Qi Xiao
4b05661c44 eval: Add builtin lt and gt. 2016-02-20 21:20:18 +01:00
Qi Xiao
6ee16abba0 Remove GenericError. 2016-02-20 21:12:54 +01:00
Qi Xiao
385fccfcda eval: Reorder tests. 2016-02-20 21:10:56 +01:00
Qi Xiao
f407db7283 eval: Use location information in {,Values}Op.
This also fixes a NullPointerException.
2016-02-20 12:25:51 +01:00
Qi Xiao
91fc4a3419 each now takes any CallerValue. 2016-02-20 03:44:08 +01:00
Qi Xiao
5c03407a8a Wait for store jobs to finish when exiting.
This fixes #144 #147.
2016-02-20 02:32:12 +01:00
Qi Xiao
169b9917e3 Refine evaler's error reporting. 2016-02-20 00:48:13 +01:00