Commit Graph

5103 Commits

Author SHA1 Message Date
Qi Xiao
959120162b pkg/eval: Use cmpd.StringLiteral in one more place.
Also remove an unused method that is now superseded by the cmpd package.
2021-03-19 23:18:42 +00:00
FallenWarrior2k
aaa4d2a431 Lock image versions in Dockerfile
I'm suspecting the broken build was related to the package name
changing, and restricting the versions in use should prevent this in
future.
2021-03-19 23:14:10 +00:00
FallenWarrior2k
ce255e0672 Fix Docker build failure (man -> mandoc) 2021-03-19 23:14:10 +00:00
Kurtis Rader
69a8adb2e9 Allow quoted var names in an except... block
Related #1258
2021-03-19 22:59:25 +00:00
Qi Xiao
4ecdb7f278 pkg/cli: Simplify the TTY interface by making it embed term.Writer. 2021-03-19 21:40:32 +00:00
Kurtis Rader
663e04ff75 Fix when cursor is shown by edit:clear
Showing the cursor should only happen after the prompt is redrawn.

Fixes #1238
2021-03-19 21:12:21 +00:00
Qi Xiao
6439a3cbb2 website/learn: Add an FAQ page.
This page supersedes the "name" and "philosophy" pages, which have been removed.
HTTP 301 redirects will be set up on the server of elv.sh to keep the old URLs
valid.
2021-03-02 00:00:57 +00:00
Qi Xiao
f3bef66ee2 website/ref/edit.md: Expand the doc on manipulating TTY in a keybinding. 2021-02-26 00:45:03 +00:00
Qi Xiao
b2591e95a7 Add new edit:clear command.
This fixes #1238.
2021-02-26 00:36:09 +00:00
Qi Xiao
634d71dcba Extract utilities for compound nodes into pkg/parse/cmpd. 2021-02-24 00:02:47 +00:00
Qi Xiao
e3b0b27931 Do not append slash after expanding ~username.
This fixes #1246.
2021-02-23 23:25:48 +00:00
Qi Xiao
798ab42a30 Tweak the sourcegraph action. 2021-02-21 23:51:08 +00:00
Qi Xiao
878590f2b0 Upload sourcegraph index in GitHub Action. 2021-02-21 23:48:42 +00:00
Qi Xiao
9ebb46be0f pkg/cli/tk: Tweak the scrollbar algorithm.
The algorithm now guarantees that the scrollbar size remains the same if the
window size remains the same.
2021-02-21 23:05:41 +00:00
Qi Xiao
a33ecb2da4 When variable cannot set, point to the variable in the stack trace.
This fixes #255.
2021-02-21 11:53:05 +00:00
Qi Xiao
53593c3ab7 Document new Matrix room. 2021-02-18 10:57:54 +00:00
Qi Xiao
60d7a01e3d website/get: Add detailed instructions for installing the official binary. 2021-02-17 23:40:45 +00:00
Qi Xiao
5327ba3521 Make tests compatible with "go test -count n" (n > 1).
The "-count" flag causes the test functions to be invoked multiple times. Since
some tests mutate their test data or some global state, they will fail when
invoked with a count larger than 1.

This commit changes *some* of such tests to either avoid mutating the test data,
or resetting the global state. Some such tests still remain and will be fixed later.
2021-02-17 22:46:32 +00:00
Qi Xiao
fcc005a14a Fix pkg/edit test - one file was left out of that commit. 2021-02-17 22:42:06 +00:00
Qi Xiao
a6f1a7bdd0 Require Go >= 1.15.0 to build. 2021-02-17 22:40:35 +00:00
Qi Xiao
c75c6c5da6 Rename the &bindings option of edit:listing:start-custom to &binding.
It was renamed by accident.

Also add a test for the &binding option.
2021-02-17 22:31:36 +00:00
Qi Xiao
de52aa9be5 website/get: Add a missing "s". 2021-02-16 05:56:11 +00:00
Qi Xiao
84625ce652 website: How to install Elvish and use it as the default shell. 2021-02-15 23:51:54 +00:00
Qi Xiao
9ffa63ae96 website: Update the get page.
* Add TOC.

* Tweak the OS packages section a bit.

* Unbreak the NEXT-RELEASE link by creating it as a symlink.

Also remove an unnecessary "./" in Makefile.
2021-02-15 21:21:41 +00:00
Qi Xiao
84b30467d0 website: Add style for h3. 2021-02-15 20:55:50 +00:00
Qi Xiao
ed854fa667 Remove edit:histlist:toggle-case-sensitivity; do smart-case matching. 2021-02-14 15:52:38 +00:00
Qi Xiao
ba7a72631c Fix readline-binding, and add a test. 2021-02-14 14:41:38 +00:00
Qi Xiao
f8ace8fa90 cmd/examples: cliaddon -> nav. 2021-02-14 06:49:09 +00:00
Qi Xiao
5e202ebe5f cmd/examples/e3bc: Add completion. 2021-02-14 06:46:22 +00:00
Qi Xiao
15af76a22e pkg/edit: Add edit:global-binding for global bindings.
The binding of Esc to close modes is now a default global binding, instead of in
every mode.
2021-02-14 02:05:13 +00:00
Qi Xiao
9f13c3cc6e pkg/cli: Support global bindings.
Global bindings are consulted when an event is not handled by the active widget.
2021-02-14 01:38:34 +00:00
Qi Xiao
3545cb5020 pkg/cli/mode: Fix a flaky completion mode test. 2021-02-13 23:23:23 +00:00
Qi Xiao
0976cacf09 Fix style. 2021-02-13 23:21:39 +00:00
Qi Xiao
62f0f4b580 pkg/cli/mode: Expose the navigation mode as a widget. 2021-02-13 23:21:39 +00:00
Qi Xiao
fb134df955 pkg/cli/mode: Expose the custom listing mode as a widget. 2021-02-13 23:21:39 +00:00
Qi Xiao
50808dc3f2 pkg/cli/mode: Expose the lastcmd mode as a widget. 2021-02-13 23:21:39 +00:00
Qi Xiao
9af7297f75 pkg/cli/mode: Expose the instant mode as a widget. 2021-02-13 23:21:39 +00:00
Qi Xiao
0c17a09de6 pkg/cli/mode: Make Completion, Histlist, Location wrap tk.ComboBox.
Also document that they are based on ComboBox.
2021-02-13 23:21:39 +00:00
Qi Xiao
a535e7a160
Show master branch coverage in the codecov branch
Also link to the coverage report for the master branch.
2021-02-13 01:43:01 +00:00
Qi Xiao
0931789cde Fix style. 2021-02-13 01:26:13 +00:00
Qi Xiao
9c5669ecdd pkg/cli/mode: Expose the location mode as a widget. 2021-02-13 01:25:05 +00:00
Qi Xiao
be04ccf1fe pkg/cli/mode: Expose the histlist mode as a widget. 2021-02-13 00:54:18 +00:00
Qi Xiao
121232d50c pkg/cli/mode: Expose the completion mode as a widget. 2021-02-12 23:14:29 +00:00
Qi Xiao
52dbfeea66 pkg/cli/mode: Expose the stub mode as a widget. 2021-02-12 23:14:25 +00:00
Qi Xiao
c7dc4d93d3 pkg/cli/mode: Add back the "Mode" prefix to ModeLine and ModePrompt. 2021-02-12 22:37:46 +00:00
Qi Xiao
a785c3b24f pkg/cli: Rewrite histwalk mode as a widget.
Also move it to pkg/cli/mode. Other mode implementations will also be moved into
pkg/cli/mode as they get rewritten as widgets.
2021-02-12 22:34:44 +00:00
Qi Xiao
7f0463a156 pkg/cli: Pass the widget to binding bodies.
A new type, tk.Bindings is defined for bindings. It is always called with the
widget currently handling the event, in addition to the event being handled.
2021-02-12 21:34:47 +00:00
Qi Xiao
c2319fbf59 pkg/cli: Add a SetAddon method to App. 2021-02-12 18:43:34 +00:00
Qi Xiao
8fbbdf4983 pkg/cli: Reorder the methods in App. 2021-02-12 14:19:07 +00:00
Qi Xiao
5e3b9d6431 pkg/cli/tk: De-export test utilities. 2021-02-11 22:34:38 +00:00