Commit Graph

6517 Commits

Author SHA1 Message Date
Qi Xiao
1d81066513 website: Link to other pages from scripting case study. 2024-02-29 14:49:19 +00:00
Qi Xiao
6f15decd3b website: Expand the scripting case study doc slightly. 2024-02-29 14:35:25 +00:00
Qi Xiao
b3d9ef57aa Spell the Docker GitHub Actions workflow with a capital D. 2024-02-29 10:28:54 +00:00
Qi Xiao
2563b2316f Build Docker images and push to ghcr.io.
Also slim down the Dockerfile to only include Elvish.
2024-02-29 10:24:11 +00:00
Qi Xiao
b39e9212cc website/get: Support selecting TUNA's mirror.
Also document TUNA's mirror in all-binaries.md.
2024-02-29 09:40:55 +00:00
Qi Xiao
c806b38b19 website: Show underline when hovering over links. 2024-02-28 20:02:37 +00:00
Qi Xiao
5b5bd9a0db website: Use "list-style: none" for article lists.
For some reason "list-style: inside" doesn't play well with flexboxes on Chrome
or Firefox.
2024-02-28 19:03:31 +00:00
Qi Xiao
3fe6d66168 website: Add fallback content when JavaScript is disabled. 2024-02-28 18:40:22 +00:00
Qi Xiao
18f3e72981 website: Style tweaks.
- Give <h[123]> a margin-bottom equal to <p> and a larger margin-top.

  This sets them apart from the previous section but not the section they are
  leading.

- Give the article list on category index pages alternating backgrounds, and
  remove the on-hover background color.

- Various minor tweaks.
2024-02-28 18:32:40 +00:00
Qi Xiao
00ff7c4a62 website: Fix the style of /get in dark mode. 2024-02-28 16:26:41 +00:00
Qi Xiao
01649f8fb1 website: Update .gitignore and add ttyshot files back. 2024-02-28 16:15:03 +00:00
Qi Xiao
fec87dde0a website: Run "go mod tidy". 2024-02-28 16:13:04 +00:00
Qi Xiao
6890e7177b website: Revamp /get.
- Make the homepage an interactive page to generate an installation script.

- Move the other content into their individual pages.

  - Add Repology badges for all individual package managers.
2024-02-28 16:11:19 +00:00
Qi Xiao
1412473b4a website: Revamp homepage, site-wide styles and ttyshots.
- Homepage revamp:

  - Rewrite the homepage in a linear format of sections, with every other
    section styled with full-width gray background.

  - The first section is a short intro, with big buttons for "download" and
    "learn".

  - Create a new "case studies" page to house the explainers for the examples.

- Site-wide styles:

  - Restyle code blocks and ttyshots, using a more subtle gray border box
    instead of gray background.

  - Support headers for code blocks and ttyshots, in a style that vaguely
    resembles title bars of desktop windows. In Markdown sources, additional
    content after the language tag becomes the header.

  - Reorganize the global stylesheet and template, including using 2 spaces for
    indentation and putting dark mode color rules next to the light mode rules.

  - Change debug hotkey to toggle dark mode to Shift-D.

- Ttyshots:

  - Handle trailing spaces in more places in the ttyshot tool - there seems to
    be more of them in the latest tmux version.

  - Base the ttyshot tool's parser on pkg/transcript.

  - Support per-ttyshot cols and rows.

  - Rename x.elvts and x.ttyshot.html to x-ttyshot.elvts and x-ttyshot.html.

  - Change the syntax from "@ttyshot filename" to code block with a special
   "ttyshot" language tag to work better with the header syntax.
2024-02-26 18:23:16 +00:00
Qi Xiao
d5553b1176 Bump dependency versions. 2024-02-26 17:38:04 +00:00
Qi Xiao
9d2c6d9217 Deprecate implicit cd.
This addresses #1099.

Also link to location mode from the elvdoc of cd (originally part of #1764).
2024-02-26 17:33:18 +00:00
Qi Xiao
deec3c06b2 tools/buildall.elv: Fix bin name in archive to "elvish" or "elvish.exe".
Fixing the filename makes it slightly simpler to install Elvish from the
official binary archives.
2024-02-26 15:46:54 +00:00
Qi Xiao
4f822ab654 New md: module. 2024-02-26 10:40:24 +00:00
Qi Xiao
175b835bbd edit:kill-{left right}-alnum-word -> edit:kill-alnum-word-{left right}.
This fixes #1768.
2024-02-24 10:23:03 +00:00
Qi Xiao
78bca90019 tools: Remove buildall.sh now that buildall.elv seems to be working. 2024-02-22 17:53:31 +00:00
Qi Xiao
7b7462f02c tools/buildall.elv: Remove code for passing -buildmode=pie.
The code for passing -buildmode=pie in buildall.sh didn't actually work -
"go env GOOS GOARCH" outputs two lines, while the grep pattern expects one line.

The buildall.elv script implements this correctly, and as a result this exposes
the fact that passing -buildmode=pie requires some extra work for
reproducibility - among other things, it causes the binaries to be dynamically
linked.

Just disable it for now to get reproducibility. We're not losing anything as
that was the (unintended) old behavior of buildall.sh anyway.
2024-02-22 17:34:19 +00:00
Qi Xiao
4a2880c69d Only check binary checksums in GitHub Actions and Cirrus CI scripts.
The archives depend on the tools used to create them and are not exactly
reproducible.
2024-02-22 16:32:19 +00:00
Qi Xiao
9509111fa9 Fix invocation of buildall.elv in GitHub Actions and Cirrus CI scripts.
The first argument should point to a Go package.

Also change the pattern for sha256sum files to include all files ending in
.sha256sum, now that the archives have also been made reproducible.
2024-02-22 16:25:46 +00:00
Qi Xiao
c03e34dffa Use buildall.elv in GitHub Action and Cirrus CI.
The way -buildmode=pie is passed to Go has changed between buildall.sh and
buildall.elv (the former uses GOFLAGS, the latter adds it directly to the
command line), so the binaries are not fully reproducible between the two. Using
the same script should fix that.
2024-02-22 16:18:06 +00:00
Qi Xiao
15328d585e tools: Convert run-race.sh to run-race.elv. 2024-02-22 13:57:21 +00:00
Qi Xiao
03006c95f1 tools: Convert buildall.sh to buildall.elv. 2024-02-22 13:40:05 +00:00
Qi Xiao
dcc544c612 vscode: Add config for firstLine (.elv) and wordPattern (.elv and .elvts). 2024-02-22 13:15:13 +00:00
Qi Xiao
05e77f0763 pkg/mods/flag: Add &on-parse-error to flag:call. 2024-02-22 11:31:26 +00:00
Qi Xiao
2ead9c4b80 pkg/mods/flag: Run transcript test.
This module seems to have been missed during the conversion to transcript tests.
2024-02-21 16:24:26 +00:00
Qi Xiao
acd0903f0d pkg/edit: Add back Page{Up Down} key bindings for listing modes. 2024-02-21 11:22:15 +00:00
Qi Xiao
555a3dfc86 pkg/eval/evaltest: Setups no longer propagate by default.
An explicit "each:" prefix is now required.
2024-02-20 22:24:40 +00:00
Qi Xiao
9ae071f987 pkg/buildinfo: Move detailed documentation to package level.
Code blocks don't work well in godoc for variables because they render the same
as the "var Name = Value" blocks themselves, resulting in a confusing look.

Also make the instructions in PACKAGING.md even briefer, now that the full
instruction is available as a continuous prose in the godoc for pkg/buildinfo.
2024-02-20 14:56:54 +00:00
Qi Xiao
6610add24a PACKAGING.md: Simplify instructions, and link to godoc of pkg/buildinfo.
Also expand the godoc of pkg/buildinfo.
2024-02-20 00:09:12 +00:00
Qi Xiao
c99932929e Add os:{mkdir-all symlink rename}.
This addresses #1659.
2024-02-19 14:48:46 +00:00
Qi Xiao
ae791f1f51 vscode: Minor refactors. 2024-02-19 14:09:09 +00:00
Qi Xiao
1cafee12e2 CONTRIBUTING.md: Document transcript tests. 2024-02-19 13:57:53 +00:00
Qi Xiao
47f21df951 vscode: Add command for updating the output of a single interaction.
Also convert the extension source to TypeScript, and update dependencies.
2024-02-19 13:42:39 +00:00
Qi Xiao
37ac39e865 pkg/eval/evaltest: Support checking the output of a single interaction.
This functionality is triggered by an environment variable ELVISH_TRANSCRIPT_RUN
and will be used in the VS Code plugin.
2024-02-19 13:41:37 +00:00
Qi Xiao
9aae87c300 pkg/transcript: Remove mentions of directive propagation. 2024-02-18 23:28:17 +00:00
Qi Xiao
fe99b9fb1e pkg/transcript: Attach line range information to Node and Interaction. 2024-02-18 12:54:53 +00:00
Qi Xiao
f57164f7fe Make string comparision commands except !=s accept any number of arguments.
They have been documented to do so, but the implementation only accepted two
arguments.
2024-02-18 10:56:30 +00:00
Qi Xiao
b310bfeefb pkg/eval: Change != and not-eq to only accept two arguments.
The !=s command already only accepts two arguments.

This fixes #1767.
2024-02-18 10:47:17 +00:00
Qi Xiao
3b27569e2c pkg/elvdoc: Remove support for "#doc:fn".
This construct is only used in two places - grouping numerical comparison
commands together and grouping string comparison commands together. However,
grouping them together makes it impossible to look up their individual elvdocs,
for example using "doc:show '<'", so abandon this half-baked grouping mechanism.

In future a more general mechanism to group symbols together may be introduced.

Document != and !=s as if they only take two arguments, addressing #1767. The
actual change will be done in a separate commit.
2024-02-18 10:47:17 +00:00
Qi Xiao
4629f94d10 pkg/elvdoc: Support quoted strings in fn and var forms. 2024-02-18 10:23:52 +00:00
Qi Xiao
8bf7b18e2b pkg/parse: Add QuoteCommandName. 2024-02-18 10:23:52 +00:00
Qi Xiao
e9af4ec638 pkg/transcript: Use the line numbers from pkg/{elvdoc md}. 2024-02-18 10:23:52 +00:00
Qi Xiao
bdf3ec6315 pkg/elvdoc: Keep track of which line each elvdoc block starts.
To simplify things, require that "#doc:" directives appear after the comment
block.
2024-02-18 10:23:15 +00:00
Qi Xiao
3387f454b7 pkg/elvdoc: Change the semantics of Entry.{Name Content}
The Name field now contains the qualified name, with the "$" prefix for variables.

The Content field no longer contains the usage text for functions. That is now
stored in a separate Fn field, and the FullContent method now returns what used
to be the Content field.
2024-02-17 18:43:11 +00:00
Qi Xiao
2c0cc610d8 pkg/strutil: Add JoinLines. 2024-02-17 18:43:11 +00:00
Qi Xiao
20b74b6950 pkg/transcript: Return parse result as a tree. 2024-02-17 17:57:06 +00:00