Commit Graph

178 Commits

Author SHA1 Message Date
Qi Xiao
1473fccceb Make website/ its own Go module.
This allows us to remove toml as a dependency of the src.elv.sh module since it
is only used in the website's building process.
2021-01-28 11:02:30 +00:00
Qi Xiao
c18a888557
website: Update Twitter handle 2021-01-27 23:53:43 +00:00
Qi Xiao
a679c6817f website: Change the status of try elvish from "coming soon" to "beta" 2021-01-27 23:42:53 +00:00
Qi Xiao
196eea21d4 Change module import path to src.elv.sh 2021-01-27 01:30:25 +00:00
Qi Xiao
ad3a947b28 website: Fix typo in CSS 2021-01-27 01:02:44 +00:00
Qi Xiao
d3600ce358 website: Add canonical URL to the generated HTML files. 2021-01-27 00:03:12 +00:00
Qi Xiao
b87cc7b5de Add back support for circular module dependency.
This fixes #1226.
2021-01-24 14:10:45 +00:00
Kurtis Rader
be712d5405
Introduce the path: module (#1203)
* Introduce the `path:` module

This is based on https://github.com/elves/elvish/pull/1084 by @kolbycrouch
submitted five months ago. It addresses all of the feedback on that
change and includes other documentation and unit test improvements. It
also includes a couple of extensions to the original P.R., such as a
`path:is-abs` command.

I decided to resurrect that change because I want better support for
filesystem path manipulation so that users can replace non-portable
external commands such as `realpath` and `find` with Elvish builtins. This
is a baby step towards that goal.

Related #849

* Add a `path:is-regular` command

This adds a `path:is-regular` command.  This is for symmetry with the
`path:is-dir` command and the glob `[type:regular]` modifier.

It also adds support for symlinks in the `testutil.Applydir` function
and change the path unit test to use it.

* Rename path:real to path:eval-symlinks
2021-01-16 23:21:33 +00:00
Qi Xiao
072677351b Introduce "var" and "set".
Assignment using "foo = bar" instead of "var foo = bar" or "set foo = bar" is
not yet deprecated, but will be soon.

This addresses #645.
2021-01-16 06:11:37 +00:00
Qi Xiao
5f7bcb91e5 Make the syntax for the argument of "del" consistent with assignment LHS.
This fixes #1218.
2021-01-13 23:27:38 +00:00
Qi Xiao
80e944bee2 Support using arbitrary character in variable names by quoting. 2021-01-12 23:06:19 +00:00
Qi Xiao
4e2c4787c4 Document the behavior of circular module dependency. 2021-01-10 14:11:50 +00:00
Qi Xiao
0e0a0485b0 website: Fix Matrix room name. 2021-01-04 00:11:16 +00:00
Qi Xiao
d140e98f3c Fix definition of recursive functions with fn.
Also document explicitly that the function body may refer to the function being
defined.

This fixes #1206.
2021-01-03 20:44:52 +00:00
Qi Xiao
973a7931de website: Remove link to old Matrix room.
This fixes #1194.
2020-12-29 14:38:38 +00:00
Kurtis Rader
d52aa03764 In prompts implicitly coerce float64 to string
Including the float64 data type in the prompt value stream causes an error.
This causes those values to be implicitly converted to a string as happens
everywhere else in Elvish.

I initially intended to modify the code to do the implicit string coercion
for any type not otherwise explicitly handled by the pkg/ui `Concat`
methods. I decided against that approach because doing so doesn't make
sense for some types that might appear in the value stream; e.g., Elvish
exceptions.

Fixes #1186
2020-12-25 17:34:49 +00:00
Kurtis Rader
9edcb78050 Make key binding syntax more consistent
Document the format key of names and modifiers; albeit with a TODO
regarding the `Shift` modifier.

Make function key modifier matching case sensitive (`Alt` not `alt`)
to match key name matching (`Enter` not `enter`).

Implement `Ctrl-?` as the logical counterpart to `"\c?"`.

Resolves #1163
2020-12-25 00:39:43 +00:00
Qi Xiao
6f3b8a787b Minor fixup for last commit. 2020-11-07 19:02:44 +00:00
Kurtis Rader
b58b495d77 Fix hang reading value channel from a redirection
Fixes #600
Fixes #1010
2020-11-07 13:52:29 -05:00
Qi Xiao
80208d3972 Remove stale go:generate lines.
This fixes #1175.
2020-10-28 23:12:56 +00:00
Kurtis Rader
784c4159d2 Minor documentation improvements
Fixing issue #857 will require some non-trivial work. But I noticed these
documentation cleanups when I started working on the issue so I'm making
them as an independent change.

Related #857
2020-10-22 15:28:06 +01:00
Qi Xiao
2cf7f8f0ec Small wording fix for Effective Elvish. 2020-10-10 22:47:56 +01:00
Shengjing Zhu
6c08de0ff3 Fix typos found by codespell 2020-10-10 22:47:50 +01:00
Scott Reeves
c5e2069e65 Update "Effective Elvish" for deprecated functions 2020-10-10 22:44:00 +01:00
Scott Reeves
3085870115 Try to resolve confusion around Alt-1 vs. Alt-, 2020-10-10 22:38:36 +01:00
Qi Xiao
04015806a6 website/learn/unique-semantics: add back comparison with &&. 2020-10-10 22:31:29 +01:00
Kurtis Rader
10085080f2 Fix typos and clarify wording 2020-10-10 22:27:45 +01:00
Qi Xiao
5cb2a83959 website/ref/language.md: Fix typo. 2020-09-04 22:41:32 +01:00
Qi Xiao
48919bcb24 pkg/: Move test utilities from util/ to testutil/. 2020-09-03 04:55:16 +01:00
Qi Xiao
eb9638fc16 pkg/eval: Move modules into a mods directory. 2020-09-03 04:31:04 +01:00
Qi Xiao
8988d6e5f0 website/ref Document function introspection, and move exception introspection.
Also introduce the concept of pseudo-map for documenting them.

This fixes #1122.
2020-08-31 22:12:00 +01:00
Qi Xiao
6a5903df90 website/learn: Update cookbook.
This fixes #1134.
2020-08-31 21:09:40 +01:00
Qi Xiao
1b26cdde7e website/ref/language: Small editoral changes; fix typos. 2020-08-31 15:17:00 +01:00
Qi Xiao
46dedae9fa website/ref: Restructure a large part of the language reference.
The new structure is inspired by the Go language spec. A lot of sections also
have minor updates, and some new sections have been written.
2020-08-31 14:41:44 +01:00
Qi Xiao
d98f7881eb website/ref: Drop the "the" in "the language specification". 2020-08-31 14:32:36 +01:00
Qi Xiao
26412e1284 website: Move the basic style for tables into style.css, from get/prelude.css. 2020-08-31 14:31:59 +01:00
Qi Xiao
37001a42f2 language.md: Improve wording of first few sections. 2020-08-27 01:19:36 +01:00
Qi Xiao
f91ed63b79 Document the support for SGR sequences in prompts. 2020-08-25 23:26:51 +01:00
Qi Xiao
1e2ead56e2 pkg/eval: Rewrite the lvalue parsing code.
Also lift the restriction on rest variables and rest arguments - they may now
appear anywhere, as long as there is only one.
2020-08-20 13:15:00 +01:00
Qi Xiao
f2264ee4df Update reference to removed "explode" command to refer to "all" instead. 2020-08-18 21:13:59 +01:00
Qi Xiao
ceda0d052b Update more examples to reference new slice syntax. 2020-08-17 05:34:06 +01:00
Qi Xiao
a7934a6810 Remove references to old slice syntax, and the unimplemented "@" index. 2020-08-17 05:31:46 +01:00
Qi Xiao
944948beab website/ref: Expand the doc for modules. 2020-08-17 00:08:15 +01:00
Qi Xiao
497d987c68 website: Update first ttyshot to avoid deprecated "explode".
This fixes #1101.
2020-08-16 21:24:33 +01:00
Qi Xiao
7d1c6cf5ec ref/re.md: Link to the godoc of regexp/syntax instead of regexp.
This fixes #1090.
2020-08-16 17:09:47 +01:00
Qi Xiao
de64aa9db3 Release 0.14.1. 2020-08-16 14:40:38 +01:00
Qi Xiao
e2f08af91b Change slice syntax to use .. instead of :.
Also support ..= for closed-range slices, a la Rust.

The old syntax is still supported, but deprecated.

This fixes #669.
2020-08-15 22:52:50 +01:00
Kurtis Rader
082052b5a8 Document double-quoted string escape sequences 2020-08-11 16:07:58 +01:00
Kurtis Rader
a3f66b52af Document underscores in number literals 2020-08-01 23:08:11 +01:00
Shengjing Zhu
4e4462053b Remove PPA from website
It hasn't been updated since 2018
2020-07-11 14:21:35 +01:00