Qi Xiao
266e01d474
Reformat os.md to placate the style checker
2024-01-03 12:05:00 +00:00
Wyatt Campbell
a1a56e9789
Changed os reference documentation to use follow-symlink instead of old eval-symlinks
2024-01-03 12:05:00 +00:00
Qi Xiao
66dc7c9bf0
Merge pull request #1740 from krader1961/issue-1738-key-down
...
Fix edit:insert:binding regression
2024-01-03 11:48:57 +00:00
Qi Xiao
d86b61cac9
Fix broken links in d.elv files.
2024-01-02 19:38:14 +00:00
Qi Xiao
8e67588090
pkg/eval: Remove unused toFloat64.
2024-01-02 19:34:31 +00:00
Qi Xiao
4fd1b9525f
Document deprecation of eawk and removal of float64 in release notes.
2024-01-02 19:33:37 +00:00
Qi Xiao
1865db6542
Merge branch 'merge-eawk-sep'
2024-01-02 15:11:55 +00:00
Qi Xiao
7d38243540
Remove float64, and deprecate eawk from 0.20.0.
2024-01-02 15:11:38 +00:00
Qi Xiao
e4564688bf
Rename eawk -> re:awk.
...
Also rename &posix to &sep-posix, and add &sep-longest.
The original eawk name is documented as deprecated but doesn't emit deprecation
warnings during compilation yet; this will be fixed in the next commit.
2024-01-02 15:07:37 +00:00
Qi Xiao
e105493ac8
pkg/cli: Fix the height distribution algorithm to match the comment.
2023-12-31 21:19:32 +00:00
Qi Xiao
7c429c70d4
Fix the rendering of listboxes when height = 1.
...
Fix the division by 0, and special-case this condition to show one row of
content and hide the scrollbar.
This supersedes #1736 .
2023-12-31 21:16:28 +00:00
Qi Xiao
495f427e66
Merge pull request #1728 from saolof/eawk_improvements
...
Make eawk accept a custom separator
2023-12-27 23:47:41 +00:00
Kurtis Rader
1d4375027f
Fix edit:insert:binding regression
...
Add an insert mode binding that was accidently lost by an earlier refactoring
that moved default bindings from Go code to embedded Elvish code.
Fixes #1738
2023-12-26 20:55:45 -08:00
Qi Xiao
b3eaccd7e7
Bump version of staticcheck and codespell.
2023-12-26 20:47:52 +00:00
Qi Xiao
1125300f17
Merge pull request #1732 from krader1961/fix-typos
...
Fix typos
2023-12-26 20:38:56 +00:00
Kurtis Rader
0e9c21e8bf
Fix typos
...
I recently upgraded my `codespell` command to version 2.2.6 which caused
creating a pull-request to catch the typos fixed by this change.
2023-11-19 21:44:44 -08:00
Olof Salberger
674740fbc6
Fix typo in comment
2023-10-14 09:09:34 +02:00
Olof Salberger
a274aa1676
Added real world test with docker image ls output
2023-10-14 08:43:36 +02:00
Olof Salberger
1b6477878e
Add separator pattern to eawk
...
One of the biggest pain points of using elvish
as a shell in practice has been parsing output from
shell commands that return text.
Many CLIs are parseable by AWK. This commit
adds the AWK separator argument to eawk,
which should make it easier to parse the
output of many shell commands.
2023-10-13 00:50:10 +02:00
Olof Salberger
9e1aee42d3
Modernize Dockerfile.
2023-10-12 23:48:51 +02:00
Qi Xiao
1c0cffbfed
pkg/eval/vals/cmp.go: Use compareBuiltin for strings too.
2023-08-25 22:18:05 -04:00
Qi Xiao
a15f0f7d0a
pkg/eval/vals: Test that structmaps are treated like maps by CmpTotal.
2023-08-22 22:07:26 -04:00
Qi Xiao
4ceb91901e
pkg/eval/vals: Pretend structmaps are maps in typeOf too.
2023-08-22 21:56:02 -04:00
Qi Xiao
62795d907d
Format the rule used by compare as an ordered list.
2023-08-22 21:20:46 -04:00
Qi Xiao
fbde7b1208
Fix name of &total option for the order command.
2023-08-22 21:12:52 -04:00
Qi Xiao
efae7e0644
Bump staticcheck to 0.4.5, and update CONTRIBUTING.md.
...
Also add comments in both CONTRIBUTING.md and .github/workflows/ci.yml about
keeping the versions in sync.
2023-08-21 00:33:58 -04:00
Qi Xiao
1b10161291
Merge pull request #1716 from krader1961/typo-fixup
...
Fix a typo detected by spellcheck
2023-08-21 00:30:59 -04:00
Qi Xiao
e5e26f1e51
Test and document NO_COLOR support.
2023-08-21 00:28:51 -04:00
Qi Xiao
c61a5c72d0
pkg/mods/os: Fix test on Linux too by not expecting a flags field.
2023-08-21 00:15:51 -04:00
Qi Xiao
53c706f790
pkg/mods/os: Fix compilation on Linux.
...
Linux's stat_t doesn't have a flags field.
2023-08-21 00:12:26 -04:00
Qi Xiao
b84204b142
Merge pull request #1714 from tw4452852/monochrome
...
support monochrome mode
2023-08-21 00:05:58 -04:00
Qi Xiao
607fa68aca
Implement os:stat.
...
Time fields are omitted for now; they will be added when there's a proper Elvish
binding for time.Time.
This addresses #1659 .
2023-08-21 00:05:05 -04:00
Qi Xiao
65bc9580cb
pkg/eval/evaltest: Print value diffs by converting them with Repr first.
...
The options to go-cmp doesn't seem to actually transform lists and maps
properly, so use the string representation for diffs now.
2023-08-20 23:30:30 -04:00
Qi Xiao
95ba078ff6
pkg/eval/evaltest: Implement value matchers with interface.
2023-08-13 23:20:54 -04:00
Qi Xiao
f240df4846
pkg/eval/vals: Add utils {Int64,Uint64}ToNum.
2023-08-13 22:46:22 -04:00
Kurtis Rader
204eed9aae
Fix a typo detected by spellcheck
...
While working on an unrelated change I noticed that `make all-checks`
found a typo. I was using codespell 2.2.5 so this also upodates the
.github/workflows/ci.yml file to depend on that release since doing so
does not introduce any false positives.
2023-08-11 21:14:39 -07:00
Tw
288e0481ac
support monochrome mode
...
Use NO_COLOR environment variable to enable monochrome mode in which foreground and background
colors will be stripped.
Signed-off-by: Tw <tw19881113@gmail.com>
2023-08-08 11:40:24 +08:00
Qi Xiao
db0f599a34
Remove a paragraph on unstable symbols being at the end, since it no longer applies.
2023-08-06 12:08:26 -04:00
Qi Xiao
e847e677fe
Move a lot of symbols from path: to os:.
...
Most of the symbols moved originate from Go's os package. However,
eval-symlink, which is provided by Go's path/filepath package, is also moved to
the os: module since it requires actual filesystem access. The idea is that
Elvish's path: will only provide functionalities for lexically manipulating
file paths without referencing the actual filesystem, akin to Python's
pathlib.PurePath.
The old symbols in path: are not formally deprecated since the compiler can't
statically check symbols in modules yet.
2023-08-06 12:06:41 -04:00
Qi Xiao
a1bfc0e231
Add file:seek and file:tell.
2023-07-23 10:24:53 +01:00
Qi Xiao
d56291136a
Add an &also-input option to file:open-output.
2023-07-23 09:32:55 +01:00
Qi Xiao
a1b30deb86
pkg/eval/evaltest: Rename TestWithFullSetup -> TestWithSetup.
...
The old TestWithSetup is now more accurately called TestWithEvalerSetup.
2023-07-22 23:04:18 +01:00
Qi Xiao
b039500b54
Rewrite doc for $unix:umask.
2023-07-22 17:35:58 +01:00
Qi Xiao
981388d5c2
Add file:open-output.
2023-07-22 17:20:19 +01:00
Qi Xiao
cfc914e9ba
New read-bytes builtin to read a fixed number of bytes.
2023-07-20 11:24:01 +01:00
Qi Xiao
95037fc1d1
Fix website module.
2023-07-18 21:21:56 +01:00
Qi Xiao
2b68c2d678
Bump dependencies.
2023-07-18 21:13:36 +01:00
Qi Xiao
93423d3244
Support (struct)map with 'r' or 'w' fields in redirections.
...
Now that pipe is a structmap and structmaps are considered indistinguishable to
normal maps, IO redirection should support arbitrary maps too.
Update the relevant section in the language spec and rewrite it a bit.
2023-07-18 17:52:06 +01:00
Qi Xiao
ad691e7812
Fix lscolors test on Windows.
2023-07-18 12:35:15 +01:00
Qi Xiao
6481284f58
Merge pull request #1711 from mikelward/1245
...
Make Concat return a new globPattern.
2023-07-17 23:54:01 +01:00