Commit Graph

1561 Commits

Author SHA1 Message Date
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
f8bb85dcf0 Include branch name when uploading from Travis. 2016-02-21 17:00:42 +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
1f1e739ef2 sys: Fix error reporting of Tcsetgrp. 2016-02-21 16:20:01 +01:00
Qi Xiao
4c0919b130 Add package stub. 2016-02-21 15:32:26 +01:00
Qi Xiao
172fa49056 Makefile: test -v 2016-02-21 15:13:30 +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
a880b74a1b Put the actual entry function in a new run package.
This allows us to test the entry function.
2016-02-21 12:52:47 +01:00
Qi Xiao
de66cbe8d5 elvish-stub -> stubimpl 2016-02-21 12:49:24 +01:00
Qi Xiao
c29d342b07 Disable test of elvish-stub. 2016-02-21 12:21:57 +01:00
Qi Xiao
7f42872347 More cleanup. 2016-02-21 12:10:03 +01:00
Qi Xiao
36d17550cb Rearrange main.go a bit. 2016-02-21 12:00:02 +01:00
Qi Xiao
8215baf392 Rewrite elvish-stub in C. 2016-02-21 11:59:46 +01:00
Qi Xiao
e46ed89be9 Almost rewrite test script of elvish-stub. 2016-02-21 01:07:20 +01:00
Qi Xiao
ea806f8671 Fix elvish-stub test script. 2016-02-21 00:56:04 +01:00
Qi Xiao
d96b50240d Use a more robust way to wait for elvish-stub's startup message. 2016-02-21 00:52:35 +01:00
Qi Xiao
830441ca22 Makefile: Also test elvish-stub. 2016-02-21 00:45:03 +01:00
Qi Xiao
7b1a5f8bac Build and upload elvish-stub in Travis. 2016-02-21 00:42:11 +01:00
Qi Xiao
ef61fcf234 Add elvish-stub. 2016-02-21 00:28:15 +01:00
Qi Xiao
56fae84255 Capitalize elvish in docstring of main.go. 2016-02-20 22:51:55 +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
3d32200799 parse: Save one LOC. 2016-02-20 17:12:17 +01:00
Qi Xiao
5dee621830 parse: Run gofmt after generating boilerplate. 2016-02-20 17:10:44 +01:00
Qi Xiao
a1a495cc09 parse: Fix go:generate line. 2016-02-20 17:10:31 +01:00
Qi Xiao
09b77f6127 parse: Remove unused funcs; test Quote. 2016-02-20 17:05:28 +01:00
Qi Xiao
5a1fbf814b Remove an used func. 2016-02-20 16:54:24 +01:00
Qi Xiao
4cca805a1c parse: Add test cases. 2016-02-20 16:52:24 +01:00
Qi Xiao
3cc9f757b1 Merge pull request #149 from Zirak/master
edit: Fix crash in history listing mode
2016-02-20 16:30:19 +01:00
Qi Xiao
2dba0c4b53 parse: Test parsing of control structures. 2016-02-20 15:34:31 +01:00
Qi Xiao
618d927605 parse: Check all fields of AST. 2016-02-20 15:17:34 +01:00
Qi Xiao
935bfd24e7 parse: Move checkAST into a seprate file, add doc. 2016-02-20 14:44:44 +01:00
Zirak
bf64621b7e edit: Fix crash in history listing mode
When you had too few history entries to display in the terminal,
entering history listing mode attempted to access a negative index and
crashed.
2016-02-20 12:31:47 +00: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
83b214e31c edit: When doing a refresh, erase just once in the beginning.
Previously if you bind `le:binding[insert][Ctrl-L] = { put * }`, there is a
small defect that is readily observed by pressing Ctrl-L repeatedly:
the prompt will never go to the bottom of terminal, but always kept one line
higher than the bottom.

This is because invoking a closure from the editor causes a full refresh,
which in turn causes an erase to be done near the end of writer.refresh,
which, in the old algorithm, always adds a superfluous newline.

By doing the erase at the very beginning, we avoid the superfluous newline.
Now pressing Ctrl-L repeatedly will push the prompt to the bottom.
2016-02-20 03:05:03 +01:00
Qi Xiao
6f21bc690f Go back to mattn/go-sqlite3. 2016-02-20 03:04:44 +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
098965cfac Also close the database.
Doesn't help with #147 though.
2016-02-20 02:27:26 +01:00
Qi Xiao
3c75e71a8b Use a fork of mxk/go-sqlite. 2016-02-20 01:47:40 +01:00
Qi Xiao
8cb35dfafc Fix a NullPointerException. 2016-02-20 01:37:38 +01:00
Qi Xiao
8900e57707 Switch to mxk/go-sqlite for the SQLite3 backend.
This one has the advantage of supporting SQLite3-specific operations.
2016-02-20 01:22:22 +01:00