Qi Xiao
383a7f2696
pkg/md: Support HTML entities.
2022-09-26 01:07:51 +01:00
Qi Xiao
5bf0cf7d6c
pkg/md: New package for Markdown renderer.
2022-09-26 00:08:15 +01:00
Qi Xiao
241f15de42
Clean up tests introduced in #1604 slightly.
2022-09-11 15:58:58 +01:00
kas
93c9f86555
Add support for completing invocations of local executables
2022-09-11 15:54:13 +01:00
rok
f4f96b47b8
vi append command binding
2022-09-11 15:36:53 +01:00
Qi Xiao
27e2df9394
Remove edit:-dump-buf.
...
This used to be used for taking ttyshots but is now obsolete.
2022-09-11 15:33:59 +01:00
Kurtis Rader
2f21892e0c
Documentation fixups ( #1584 )
...
I noticed these functions didn't have a "usage" while working on a `help` command.
Co-authored-by: Qi Xiao <xiaq@users.noreply.github.com>
2022-09-11 15:28:32 +01:00
Qi Xiao
f8f0f3e889
Fixup for #1588
2022-08-29 12:29:24 +01:00
Kurtis Rader
eed6a995dd
Support comparing booleans ( #1588 )
...
Fixes #1585
2022-08-29 12:25:54 +01:00
Kurtis Rader
a549dba0ba
Add missing "usage" text for three commands
...
I noticed this when testing my `help` command and noticed that
`help builtin:` produced three lines of "usage" text that did not
include a function or variable name.
2022-08-29 12:10:31 +01:00
Qi Xiao
8cb125c911
Improve documentation for %.
2022-08-29 12:09:43 +01:00
Kurtis Rader
c6e10f12a2
Some minor documentation fixes
...
Mostly elimination of duplicated words but also a few other fixes such
as the output of commands such as `%`.
2022-08-29 12:04:59 +01:00
Qi Xiao
595f00ae51
pkg/glob: Add a comment on symlink resolution.
2022-08-29 11:51:26 +01:00
Qi Xiao
21e951427f
pkg/edit/highlight: Highlight the catch keyword.
2022-08-29 11:18:57 +01:00
Qi Xiao
629cc9c85e
Fix elvdoc for compact.
2022-08-29 11:08:19 +01:00
Kurtis Rader
03539c3e70
Remove redundant math: var usage text
...
Resolves #1580
2022-08-28 23:04:00 +01:00
Qi Xiao
acf470f104
New "compact" command.
...
This fixes #1453 .
2022-08-28 22:58:37 +01:00
Qi Xiao
181c4dde55
pkg/eval: Create builtin_fn_stream_test.go.
...
Tests for functions defined in builtin_fn_stream.go are moved there.
2022-08-28 22:08:00 +01:00
Qi Xiao
9ce24d616e
Fixup for #1567 .
...
- Don't skip glob_test on Windows.
- Document the change as a breaking change.
2022-08-28 21:55:56 +01:00
Kurtis Rader
a72224d7f0
Fix glob expansion that includes broken symlinks
...
Glob expansion should use os.Lstat rather than os.Stat so that broken
symlinks don't stop glob expansion. It's not the place of glob expansion
to decide if a particular path is good.
The symlink test cases and logic were borrowed from
pkg/mods/path/path_test.go.
Fixes #1240
2022-08-28 21:46:39 +01:00
Qi Xiao
7c75510407
pkg/mods/runtime: Make $elvish-path $nil if os.Executable returns an error.
2022-08-13 11:42:16 +01:00
Qi Xiao
c2a5533a61
Merge branch 'master' into issue-1423-expose-elvish-path
2022-08-13 11:35:41 +01:00
Qi Xiao
afc3c140d9
Improve doc on conditionally importing a module.
...
- Expand the example in edit:add-var, and give it a h3.
- Add a link from the language reference to the section in edit:add-var.
This fixes #1116 .
2022-08-13 11:26:13 +01:00
Qi Xiao
da07880430
Tweak docs introduced in #1563 .
2022-08-13 10:59:22 +01:00
Kurtis Rader
1638311854
Implement path:join, separator, and list-separator
...
Resolves #1562
2022-08-13 10:55:20 +01:00
Qi Xiao
3dcfa88c8d
Remove go1.18 build tags as 1.18 is required.
2022-08-08 12:29:33 +01:00
Qi Xiao
1b8ccdbdbc
pkg/eval: Deduplicate range implementations with generics.
2022-08-08 12:28:47 +01:00
Kurtis Rader
3239c38764
Add runtime:elvish-path
...
Resolves #1423
2022-08-07 19:32:34 -07:00
Qi Xiao
551e246d96
webiste/cmd/macros: Strip leading $ from anchor targets of @cf.
...
Also add previously missing $'s in @cf arguments. This doesn't matter for the
anchor target, but matters for the link text.
2022-08-08 00:09:17 +01:00
Qi Xiao
9794eecd68
Add new runtime module.
...
This module provides $runtime:{lib-dirs rc-path effective-rc-path}. It will
likely grow in future.
This fixes #1385 .
2022-08-08 00:09:02 +01:00
Qi Xiao
2e788c846d
Run gofmt.
...
https://tip.golang.org/doc/go1.19#go-doc
2022-08-07 22:30:11 +01:00
Qi Xiao
bd569f8132
pkg/eval: Add a note about the use of echo in after-chdir's example.
2022-08-07 22:25:47 +01:00
Qi Xiao
46008d111b
Add -randseed to set RNG seed.
...
This is used in ttyshots to get deterministic outputs.
This command is prefixed with - since I'd like to eventually move rand and
randint into their own module, so this command will be moved too.
2022-08-07 11:32:52 +01:00
Qi Xiao
41fc578002
Merge branch 'ttyshot'
2022-08-04 23:41:11 +01:00
Qi Xiao
40275b97f1
Rewrite elvdoc for styled and styled-segment.
...
Also document the behavior of ignoring SGR state in the 0.19.0 release notes.
2022-07-24 14:44:16 +01:00
Qi Xiao
42c6c3b1aa
pkg/ui: Make styled text context-insensitive, and remove the "default" color.
...
Styled text is not supposed to "inherit" the current SGR styling context when
written to the terminal. This has always been the intention, but not correctly
implemented. This commit fixes that for both styled segments and styled texts.
Tests are amended to account for the difference in the output.
With context insensitivity correctly implemented, there is now no need for a
"default" color. It is functionally equivalent to a lack of color.
The parsing of SGR still needs to be aware of the codes 39 (default foreground)
and 49 (default background), but these codes are now translated into FgDefault
and BgDefault, which resets the foreground and background color fields.
2022-07-24 14:31:02 +01:00
Qi Xiao
b47f8e0dc2
pkg/shell: Add a short delay in signal handling test.
2022-06-23 22:03:12 +01:00
Qi Xiao
fed2113a66
pkg/shell: Add build tag to shell_unix_test.go.
2022-06-23 21:54:57 +01:00
Qi Xiao
4fb96d515c
pkg/shell: Test signal handling.
2022-06-23 21:48:12 +01:00
Qi Xiao
fbf0bfc13b
pkg/sys: Double init size of stack trace buf.
...
4KB is likely insufficient.
2022-06-23 21:48:12 +01:00
Qi Xiao
6810de7384
pkg/shell: Clean up signal handling goroutine.
...
This is not necessary for actual uses of Elvish, but can leave a lot of
goroutines running in tests.
2022-06-23 21:48:12 +01:00
Qi Xiao
ed97664695
pkg/eval: Test the exit command by faking os.Exit.
2022-06-23 20:25:01 +01:00
Qi Xiao
7855bc0fd7
pkg/cli/modes: Improve nav mode test coverage.
2022-06-21 23:27:36 +01:00
Qi Xiao
75c230f5eb
pkg/cli/lscolors: Increase test coverage.
2022-06-20 23:24:11 +01:00
Qi Xiao
98ee4aebdd
pkg/cli/histutil: Ignore coverage of testDB.
2022-06-20 23:06:07 +01:00
Qi Xiao
e0292dd298
Get coverage on IsStructMap methods with a hack.
2022-06-20 22:08:19 +01:00
Qi Xiao
400ada5c86
pkg/logutil: Add tests.
2022-06-20 22:03:58 +01:00
Qi Xiao
af4ca7d75b
pkg/buildinfo: Improve test coverage.
2022-06-20 21:13:34 +01:00
Qi Xiao
4afbb71c07
Move pkg/testutil/must.go to a new pkg/must.
2022-06-20 20:29:14 +01:00
Qi Xiao
d2c005df45
pkg/eval: Test import of module with invalid UTF-8.
2022-06-20 00:14:25 +01:00