Commit Graph

249 Commits

Author SHA1 Message Date
Cheer Xiao
034e74134c Print detailed completion error 2015-07-06 19:59:38 +02:00
Cheer Xiao
945822d21d Fix completion of file names when there is no slash 2015-07-06 18:00:08 +02:00
Cheer Xiao
8794232b26 Support completion of commands 2015-07-06 17:58:51 +02:00
Cheer Xiao
f52e1760b0 Revamp file name completion 2015-07-06 14:52:15 +02:00
Cheer Xiao
f85fe381d7 Bind ^H to kill-rune-left
This resolves issue #55.
2015-05-04 13:26:22 +02:00
Cheer Xiao
05e97720ca Move util/strings{"" _test} into dedicated strutil package 2015-02-26 17:04:07 +01:00
Cheer Xiao
29b916e85d Merge edit/tty into sys 2015-02-26 16:58:24 +01:00
Cheer Xiao
48c9fbd1a2 Move util/ceildiv{"" _test} to edit/ 2015-02-26 15:32:49 +01:00
Cheer Xiao
d9e94440cb Move util/{after async_reader}.go to edit/ 2015-02-26 15:31:21 +01:00
Cheer Xiao
f407b94d09 Use persistent history in the editor
This resolves issue #45.
2015-02-26 00:40:35 +01:00
Cheer Xiao
a9d2c1f4f8 Make the current line part of edit.history 2015-02-26 00:08:14 +01:00
Cheer Xiao
4601f9d161 edit.historyState -> history 2015-02-26 00:08:14 +01:00
Cheer Xiao
79d58afc17 Fix doc string of edit package 2015-02-25 17:24:35 +01:00
Cheer Xiao
91af2a8e8c Don't use dashes in golang sources 2015-02-25 16:43:31 +01:00
Cheer Xiao
72d6e63238 Much cosmetics for edit 2015-02-24 22:56:38 +01:00
Cheer Xiao
7de48274b1 Strip all parse.Node structs of the Node suffix 2015-02-24 21:59:14 +01:00
Cheer Xiao
5afdcea919 golint fixes for edit 2015-02-24 21:38:50 +01:00
Cheer Xiao
c19a982221 Remove dependency of the editor on the evaluator 2015-02-24 21:31:37 +01:00
Cheer Xiao
fd2e26700a Move error-related utilities from util to errutil 2015-02-09 12:28:36 +01:00
Cheer Xiao
b9dfd552b2 util.{Panic Recover} -> util.{Throw Catch} 2015-02-09 12:11:47 +01:00
Cheer Xiao
b9cf419891 Degrade or reformat XXX's 2015-01-23 00:38:44 +01:00
Cheer Xiao
9a224a46d6 Do something more sensible when terminal has 0 height.
This fixes issue #40.
2015-01-22 00:33:01 +01:00
Cheer Xiao
1ad8fcaa1f **.go: xiaq/elvish -> elves/elvish 2014-10-29 20:50:10 +01:00
Cheer Xiao
9c2b6871b3 Define edit.tty.Termios entirely in terms of C.struct_termios
syscall and unsafe imports are no longer needed.
2014-10-06 23:22:28 +02:00
Cheer Xiao
5069fd9774 FreeBSD compatibility fix. 2014-10-01 02:07:11 +02:00
Guangyu Zhang
e0212a7353 Add Mac OS X support 2014-09-28 10:29:20 +08:00
Cheer Xiao
8a5f2513b3 edit: Remove Highlighter.
The new Highlighter will be a completely different thing.
2014-09-21 22:36:57 +02:00
Cheer Xiao
613ad85a96 Introduce Subscript between Compound and Primary
Subscription is no longer implemented as caret. As a result,
`set $a table = [foo]; echo bar$a[0]` now works as expected.
2014-09-16 21:12:46 +02:00
Cheer Xiao
2451dc0cf9 A term is now a compound expression. A term list is now a spaced expression. 2014-09-16 17:57:33 +02:00
Cheer Xiao
319e2d9274 A factor is now called a primary expression. 2014-09-04 17:17:10 +02:00
Cheer Xiao
a3c8ed4876 Instead of specialized parse.Context, just use the incomplete parse tree 2014-08-22 09:12:18 +02:00
Cheer Xiao
776c1b3824 edit: SIGINT should not reset editorState.savedTermios
This resolves issue #29.
2014-07-29 10:30:47 +08:00
Cheer Xiao
ce7dcebb1c edit: Update an outdated comment 2014-07-29 10:25:22 +08:00
Cheer Xiao
397be11049 Reworked evaluation procedure. This resolves issue #2.
eval.Checker is now replaced by eval.Compiler which compiles the AST into a
closure operating on the Evaluator. Huge commit, sorry.
2014-04-30 10:46:36 +08:00
Cheer Xiao
70be7dcd90 Slightly more accurate highlighting of commands 2014-04-15 21:18:10 +08:00
Cheer Xiao
0761040225 Really ignore instead of panic on bogus CPR 2014-04-15 11:34:03 +08:00
Cheer Xiao
cd38cbe45e Remove bogus comments 2014-04-15 10:52:39 +08:00
Cheer Xiao
227343fffe edit: On encountering error in navigation.refresh, store it and continue 2014-04-15 10:51:23 +08:00
Cheer Xiao
06a0760ede New editor builtin kill-word-left 2014-03-30 15:03:04 +08:00
Cheer Xiao
a7bfa40302 edit.New -> .NewEditor 2014-03-20 13:16:20 +08:00
Cheer Xiao
b01a9befbd edit: Synchronize control of edit.Reader too 2014-03-17 22:54:42 +08:00
Cheer Xiao
98c034f581 util/async-reader.go: set file back to blocking mode and sync properly 2014-03-17 22:47:09 +08:00
Cheer Xiao
4a1415dcda Much better sys.SetNonblock... 2014-03-17 22:39:57 +08:00
Cheer Xiao
b0719d087c Color commands after ( and ?( 2014-03-17 22:00:35 +08:00
Cheer Xiao
06b0098705 Status redir now uses ?>. Introduce ?( for status substitution 2014-03-17 17:07:38 +08:00
Cheer Xiao
31451c572a Lex, color and highlight the new status redir token >? 2014-03-17 11:23:32 +08:00
Cheer Xiao
a6f9b61459 edit: Only put non-empty lines into history 2014-03-16 23:07:45 +08:00
Cheer Xiao
336815fe4b edit: Ditch cancel-history, just use start-insert 2014-03-13 22:30:23 +08:00
Cheer Xiao
36ab4b4f12 edit: Fix history 2014-03-13 22:27:38 +08:00
Cheer Xiao
370b88cfea edit: Get rid of leReturn.newMode and changeMode 2014-03-13 22:21:58 +08:00