Qi Xiao
be56f72729
pkg/testutil: Add utility for setting umask during tests.
2021-09-12 14:42:06 +01:00
Qi Xiao
e0b824bbdf
Improve coverage for "no suitable subprogram" error.
2021-09-12 14:23:29 +01:00
Qi Xiao
7ef7cb9f1b
pkg/eval/evaltest: Clean up godoc and some minor API details.
2021-09-12 14:13:18 +01:00
Qi Xiao
b6d69d0b30
pkg/prog/progtest: Rewrite the progtest API.
...
The progtest package now provides a declarative framework, modelled after
pkg/eval/evaltest. Tests that use progtest are now much more concise.
2021-09-12 14:06:05 +01:00
Qi Xiao
46276d6b70
Update godoc of cmd/nodaemon/elvish.
2021-09-12 00:41:27 +01:00
Qi Xiao
be3431bbbf
pkg/prog: Simplify the Program interface.
...
Instead of a separate ShouldRun method, use a special error value to signify
that a Program should not be run.
2021-09-12 00:40:35 +01:00
Qi Xiao
05a3251cd8
pkg/daemon: Use UNIX socket on Windows.
...
Windows 10 has supported UNIX sockets for a pretty long time
(https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ ).
Interestingly, os.Stat calls on UNIX socket files fail on Windows; only
os.Lstat calls work.
2021-09-11 22:05:06 +01:00
Qi Xiao
315a8b77e1
pkg/eval: Improve coverage of builtin_fn_container.go.
2021-09-11 14:51:26 +01:00
Qi Xiao
c07c26b4c7
pkg/eval/vals: Remove a duplicate test.
2021-09-11 13:57:53 +01:00
Qi Xiao
8c8a80ff52
Fix staticcheck error.
2021-09-11 02:58:54 +01:00
Qi Xiao
b36c9bf513
pkg/eval/vals: Improve coverage.
2021-09-11 02:54:34 +01:00
Qi Xiao
9ade639b38
pkg/cli/term: Improve coverage of reader_unix.go.
...
Also change error messages to start with lower case letters.
2021-09-10 20:53:02 +01:00
Qi Xiao
492ff19077
pkg/eval: Improve coverage of compile_lvalue.go.
2021-09-10 20:09:04 +01:00
Qi Xiao
276fe85bc3
pkg/eval: Improve coverage for builtin_fn_styled.go.
2021-09-10 19:39:20 +01:00
Qi Xiao
8713cb5b1c
pkg/eval: Slightly improve coverage of glob.go.
2021-09-10 19:08:22 +01:00
Qi Xiao
6b6d3d5a95
pkg/eval: Improve coverage of glob.go.
2021-09-10 18:57:11 +01:00
Qi Xiao
c3345eebc7
pkg/cli/lscolors: Fix test on Windows.
2021-09-10 01:10:23 +01:00
Qi Xiao
0f63524c97
pkg/cli/lscolors: Improve coverage of feature.go.
2021-09-10 01:02:31 +01:00
Qi Xiao
5fb6534cfe
pkg/cli/lscolors: Fix test on Windows.
2021-09-09 21:57:35 +01:00
Qi Xiao
232a605e93
pkg/cli/lscolors: Improve coverage of feature.go.
2021-09-09 21:53:25 +01:00
Qi Xiao
2301debd83
pkg/edit: Improve coverage of binding_map.go.
2021-09-08 12:46:38 +01:00
Qi Xiao
3faeb22a9c
pkg/edit: Improve test coverage of listing.go.
...
Remove edit:listing:accept-close, which is not used by any code published to GitHub
(https://github.com/search?q=%22edit%3Alisting%3Aaccept-close%22+extension%3Aelv&type=Code )
2021-09-08 01:05:14 +01:00
Qi Xiao
23ed9a8baa
pkg/edit: Improve coverage of complete_getopt.go.
2021-09-08 00:21:11 +01:00
Qi Xiao
f011034c06
pkg/cli: Simplify the API for dismissing a widget.
...
- Rename the method from "Close" to "Dimiss" to avoid any conflict with the
standard interface{ Close() error }
- Remove the "accept" parameter from the Dismiss method and App.PopAddon - it is
false in most places, and the few places that pass accept=true has knowledge
of how to accept the state in the particular widget.
- edit:history:accept has been removed as a consequence - it is never
documented, and is not currently used by any Elvish code published on GitHub
(https://github.com/search?q=%22edit%3Ahistory%3Aaccept%22+extension%3Aelv&type=Code )
2021-09-07 23:16:01 +01:00
Qi Xiao
d2936c06a1
Use a more sophisticated algorithm to distribute widget heights.
...
This is needed since there can now be an arbitrary number of widgets competing
for vertical space.
- Add a new MaxHeight method to the tk.Widget interface to provide hint on how
to distribute the height.
- Implement the algorithm in distributeHeight in cli/app.go.
2021-09-05 01:17:46 +01:00
Qi Xiao
db0b88f664
Rename pkg/cli/mode -> pkg/cli/modes.
2021-09-03 20:44:04 +01:00
Qi Xiao
9c09f5c814
Document stackable modes in 0.17.0 release notes.
2021-09-02 00:43:43 +01:00
Qi Xiao
df44c300ff
pkg/edit: Test all builtins that expect the focused widget to be a code area.
2021-09-02 00:31:48 +01:00
Qi Xiao
55e8850569
pkg/cli: Remove (*app).CodeArea.
2021-09-02 00:09:19 +01:00
Qi Xiao
0a1435f052
pkg/cli/mode: Add test for every mode expecting focused widget to be code area.
2021-09-02 00:01:52 +01:00
Qi Xiao
186bac85e6
pkg/cli: More tests against basic addon behavior.
2021-09-01 23:45:40 +01:00
Qi Xiao
b6cc46e13f
pkg/edit: Simplify some code that accesses the active widget.
2021-09-01 23:17:21 +01:00
Qi Xiao
ee92436b94
Merge branch 'master' into addon
2021-09-01 22:58:00 +01:00
Qi Xiao
c47b116345
Copy the majority of key bindings from insert:binding to minibuf:binding.
...
This is now done manually by manual copy-and-paste, but in future these two
modes should share a base binding table.
2021-09-01 22:42:23 +01:00
Qi Xiao
9ca81b9954
Make editor builtins that operate on code area use the focused code area.
...
This will allow using all such builtins from the minibuf mode.
2021-09-01 22:41:39 +01:00
Qi Xiao
919b93bf97
Document additional requirements for building the docset.
2021-08-31 20:16:56 +01:00
Qi Xiao
b5764ff820
URL-encode docset anchors.
...
Not encoding them is problematic for the / builtin.
2021-08-31 20:16:56 +01:00
Qi Xiao
293704ef03
All modes that rely on a code area now use the active code area dynamically.
...
This will enabling using any of such modes from a minibuf (e.g. completion from
a minibuf).
2021-08-30 23:59:28 +01:00
Qi Xiao
086a561731
pkg/edit: Move init script to init.elv, and embed with go:embed.
2021-08-30 09:08:30 +01:00
Qi Xiao
dfc3a28eed
Make Alt-x a global binding.
2021-08-30 09:05:18 +01:00
Qi Xiao
ff0d1f9ca5
Fixup for #1394
...
- Do not ignore errors from os.ReadDir
- Call results from os.ReadDir "files" instead of "infos"
2021-08-30 09:02:06 +01:00
Kurtis Rader
383b083760
Replace remaining deprecated ioutil.ReadDir uses
...
Resolves #1350
2021-08-30 08:57:34 +01:00
Qi Xiao
1bfcaeb218
Support a stack of addons in cli.App.
...
This is motivated by supporting a minibuf from any mode (even in minibuf mode
itself), but could have other applications too.
2021-08-30 00:55:09 +01:00
Qi Xiao
59a5979a1b
Publish 0.16.3
2021-08-28 14:31:01 +01:00
Qi Xiao
e4406de452
Publish 0.16.2 on website
2021-08-27 19:33:16 +01:00
Qi Xiao
214dafef56
CONTRIBUTING: Add instruction for running all checks.
2021-08-24 16:25:09 +01:00
Qi Xiao
ab59ef9062
Move bundled modules into .elv files.
...
- Use go:embed (available since Go 1.16) to embed them into the binary
- Teach elvdoc to support comments starting with #, and find *.elv when given a directory
2021-08-24 16:18:30 +01:00
Qi Xiao
47de83c7d1
Reorganize standard library modules.
...
- Move from pkg/eval/mods to pkg/mods
- Introduce mods.AddTo that adds all standard library modules
- Move epm and readline-binding into their own packages
2021-08-24 15:56:04 +01:00
Qi Xiao
03a51e04ae
Wording fixup for #1383 .
2021-08-24 15:34:50 +01:00
Tomáš Pospíšek
c4641b4865
mention relative imports immediately when first discussing user-defined modules
...
Mention relative imports immediately when first discussing
user-defined modules in order to make the documentation
easier to use for new users.
This implements PR #1382
2021-08-24 15:33:01 +01:00