Commit Graph

6433 Commits

Author SHA1 Message Date
Qi Xiao
89bf04a802 pkg/eval: Construct ui.Text using the functions from the ui package.
This fixes #1668, because the crashing listbox rendering code uses "len(line) >
0" (where line is a ui.Text) to test whether it is non-empty. This test doesn't
work with the ui.Text constructed using "styled ''", which creates a ui.Text
with one empty segment.

The functions from the ui package are guaranteed to never return such ui.Text
instances, so switching the implementation of the styled builtin to functions
from the ui package fixes this.
2023-03-14 21:47:38 +00:00
Qi Xiao
be04173825 Bump Go to 1.20.2 in CI. 2023-03-12 22:43:12 +00:00
Qi Xiao
33cca983f1 pkg/sys/ewindows: Regenerate ztyles_windows.go.
Also remove types_src_windows.go; it contains the same content as
types.go.
2023-03-12 22:06:52 +00:00
Kurtis Rader
34bd94dcd6 Remove obsolete build constraints 2023-03-12 21:58:18 +00:00
Qi Xiao
2a4740a523 pkg/sys/eunix: Simplify build constraints for the termiosFlag definition. 2023-03-11 20:08:56 +00:00
Kurtis Rader
2dc067dcb3 Fix some Go build/lint/test constraints 2023-03-11 19:58:54 +00:00
Qi Xiao
f86b32c22e Add an example for flag:call. 2023-03-11 00:37:52 +00:00
Qi Xiao
059a84905f pkg/edit/highlight: Highlight arguments to "del". 2023-03-10 10:11:44 +00:00
Qi Xiao
1a65886e68 Make vscode/LICENSE a copy of LICENSE.
Symlinks won't work well on Windows.

This fixes #1667.
2023-03-08 00:26:05 +00:00
Qi Xiao
2f8b0f7e75 LICENSE: Capitalize "Elvish" and fix punctuation.
This change is purely cosmetic and does not impact how Elvish's source code is licensed.
2023-03-08 00:25:19 +00:00
Qi Xiao
360102f083 Advertise 0.19.2 as the "true" 0.19.x release. /facepalm 2023-03-05 16:15:27 +00:00
Qi Xiao
37f8c47684 Update VersionBase to 0.20.0.
The master branch is now considered to be dev versions of 0.20.0.
2023-03-05 16:10:58 +00:00
Qi Xiao
7b1147a84e Publish release notes for 0.19.1.
The 0.19.0 version was tagged by mistake but has already been picked up by some
package managers. To avoid disrupting them, skip this version number and use
0.19.1.
2023-03-05 01:10:40 +00:00
Qi Xiao
0adf0ec147 Use the unix build tag.
The unix build tag is supported by Go 1.19.
2023-03-03 00:01:26 +00:00
Qi Xiao
4b67567b4e Bump required Go version to 1.19, and binaries builders to 1.20.1. 2023-03-03 00:01:26 +00:00
Qi Xiao
66c491dbc5 pkg/mods/unix: Change table to bullet list in doc.
The pkg/md-based Markdown renderer doesn't support tables, which is itself not a
standard feature of CommonMark.
2023-03-03 00:01:26 +00:00
Qi Xiao
4187d41da4 pkg/cli: Notify about unbound keys.
This gives the user some useful feedback that a key was received but not bound.

The feature was present in the original implementation of the line editor but
was lost during the rewrite.
2023-03-03 00:01:26 +00:00
Qi Xiao
2493659fbb .cirrus.yml: Bump NetBSD to 9.3. 2023-03-02 00:32:45 +00:00
Qi Xiao
5c835b1c5f vscode: Fix package.json. 2023-03-01 22:41:28 +00:00
Qi Xiao
dede073b31 Use .elvts as the standard extension of Elvish transcripts.
Rename the existing ttyshot instruction files to use the new extension too.
2023-03-01 22:39:06 +00:00
Qi Xiao
f00d18e782 Document removal of the "except" keyword. 2023-03-01 22:31:15 +00:00
Qi Xiao
67db2194c8 pkg/eval: Support slashes in relative command paths on Windows.
This fixes #1660.
2023-02-27 22:57:02 +00:00
Qi Xiao
e63e7217a2 .cirrus.yml: Remove caching in test tasks.
In a recent run the OpenBSD runner ran out of disk space:
https://cirrus-ci.com/build/4961751523917824. Looking at the details of these
tasks, uncompressing the caches takes a pretty long time, so the caching
probably doesn't make the builds much faster anyway.
2023-02-27 00:34:21 +00:00
Qi Xiao
6ba012ab75 Update Go module dependencies. 2023-02-27 00:24:04 +00:00
Qi Xiao
db89959a41 pkg/buildinfo: Split devVersionWithVariant into two functions.
This makes it a bit simpler to change the code for release branches.
2023-02-27 00:13:41 +00:00
Qi Xiao
34b115d7af Bump prog.DeprecationLevel to 19.
Remove use of float64 in tests, except for one that tests that it is deprecated.
2023-02-27 00:00:12 +00:00
Qi Xiao
5e1d0b6d3d Remove support for the "except" keyword.
It has been superseded by "catch" since the 0.18.0 release.
2023-02-26 23:55:48 +00:00
Qi Xiao
3845a2cf7f Expose stack traces in exceptions as opaque values.
Also document the correct way to compare the causes of exceptions.

This fixes #1632.
2023-02-26 23:52:26 +00:00
Benny Siegert
3820769598 elv.sh/get: add instructions for NetBSD and pkgsrc
pkgsrc is the native packaging system in NetBSD. It also supports dozens
of other operating systems, such as macOS or Illumos.
2023-02-26 20:57:24 +00:00
dunsany
9a26d6c645
Various has-key fixes (#1647)
* Correct slice indexing convention in code comment

A colon is not supported.

* Add more key slices tests

* Unify `has-key` tests with those from `pkg/eval/vals/has_key_test.go`

* Fix key slice format in documentation

Fixes #1646.

* Fix missing bracket

* Fix indexing

* Add more key slices `has-key` tests

* Fix `has-key` test expected value
2023-02-26 20:49:31 +00:00
Qi Xiao
531ea80d11 Bump version of staticcheck, fix issues found by new version. 2023-02-26 20:47:25 +00:00
Qi Xiao
eea5312e22 Fixup for #1638. 2023-02-26 20:42:10 +00:00
rok
df8642ee69 pkg/edit: implement edit:history:accept
It's api to and update codebuffer with current entry in histwalk mode.

Resolves #1636
2023-02-14 15:53:06 +00:00
dunsany
4172348398 Fix exception capture example 2023-02-04 14:37:10 +00:00
Qi Xiao
656ad14cd9 Lower-case "release notes" on elv.sh/get.
Also change "Release Note" -> "release notes" for old versions.
2023-02-04 14:35:32 +00:00
dunsany
60b3f519a8 Fix release notes wording
Actually it should be "notes", not "note".
And I would also lowercase these links, but I suppose you're not OK with this. :-)
2023-02-04 14:32:47 +00:00
dunsany
a24435105a Fix draft release notes URL
0.18.0 -> 0.19.0
2023-02-04 14:32:47 +00:00
Qi Xiao
b90c9c0355 tour.md: Reorganize the part about variables.
Instead of splitting into "setting variables" and "using variables", split into
"(ordinary) variables" and "environment variables".
2023-02-04 14:23:31 +00:00
Ian Max Andolina
bdfc8e82ac Try to stay Width<=80 characters 2023-02-04 13:31:42 +00:00
Ian Max Andolina
3ff359b950 Expand the description of setting environment variables
Elvish used to allow the `foo=bar cmd` syntax similar to other shells. This has changed and as it is a common motif I thought it would be good to mention it in the elvish<->bash comparison table (at least me as a generic end-user often goes there to work out how to do things). I added both the `{ tmp ... }` option and also using `env` command as a shortcut, although I know this is not strictly "elvish" syntax...

I also thought that as environment variable are often important for many shell tasks, expanding the Setting variables section to detail the use of builtins like `set-env` or the `E:` namespace will help new users orient themselves.
2023-02-04 13:31:42 +00:00
Qi Xiao
7e513edb0a Document implicit string conversion in compound expressions. 2023-01-28 19:26:24 +00:00
Qi Xiao
d7ea00fb7f Fix the example for pragma unknown-command. 2023-01-25 15:11:34 +00:00
Qi Xiao
1a5873eea5 Don't use deprecated "except" in tour.
This fixes #1644.
2023-01-19 10:36:25 +00:00
Qi Xiao
f4ed734d93 Implement doc:find. 2023-01-15 16:53:16 +00:00
Qi Xiao
97a73e2d95 evaltest.capturePort -> eval.CapturePort.
Also rename the original eval.CapturePort to ValueCapturePort.
2023-01-15 16:44:25 +00:00
Qi Xiao
2e13684e9b pkg/lsp: Simplify server methods by storing the connection in the context. 2023-01-15 16:44:25 +00:00
Qi Xiao
c7ed16d3cb pkg/eval/evaltest: Print byte output diff with go-cmp. 2023-01-15 16:44:25 +00:00
Qi Xiao
4e7a06dc8c pkg/lsp: Simplify method implementations with generics. 2023-01-14 23:26:05 +00:00
dunsany
1205dc5dab Small corrections in builtin module doc 2023-01-14 19:40:02 +00:00
dunsany
674983332e Update unix:umask doc
Temporary assignment syntax is different now.
2023-01-14 19:39:40 +00:00