Qi Xiao
08c5f512bf
Apply more tweaks to the path module's elvdoc.
2021-11-28 21:14:43 +00:00
Kurtis Rader
bf04fae352
Improve the path: module documentation
...
This change is due to a recent IM discussion wherein someone had
difficulty finding the `path:is-regular` command. It attempts to make
such discovery easier.
2021-11-28 21:13:46 +00:00
Qi Xiao
4df04d7cd4
Support omitting $low in randint.
...
Like range, it defaults to 0 when omitted.
2021-11-20 15:07:26 +00:00
Qi Xiao
6a5619b01e
Simplify the doc for randint.
2021-11-20 14:57:03 +00:00
Qi Xiao
2463a9ad10
pkg/eval: Link to Wikipedia for the interval notation in the doc for randint.
2021-11-19 16:32:29 +00:00
Kurtis Rader
c59e01abfc
Document the use of slurp
with printf
...
A recent IM question, and subsequent discussion, resulted in @hhanche
commenting that if you need to explicitly move the output of `printf`
from the byte to the value stream you should use `slurp` rather than
`put` or `from-lines`. Include that insight in the `printf`
documentation.
2021-11-14 16:19:46 +00:00
Kurtis Rader
8faf8930b3
Add use
unit tests and tweak documentation
...
This explicitly tests a common error case not currently verified by the
existing unit tests. Thus improving test coverage by one line. :-)
2021-11-14 16:17:51 +00:00
Qi Xiao
5198e38f28
Advice against "useless use of put".
2021-11-07 23:36:56 +00:00
Qi Xiao
b6cf0a355f
Fixup for #1417
2021-11-07 15:08:22 +00:00
Sauyon Lee
b60228cdb6
fixup! pkg/edit: Implement transpose-{alnum- small- ""}word
2021-11-07 14:50:57 +00:00
Sauyon Lee
cf4539ae9e
Add transpose binds to readline-binding
2021-11-07 14:50:57 +00:00
Sauyon Lee
1b4f2b32df
pkg/edit: Implement transpose-{alnum- small- ""}word
2021-11-07 14:50:57 +00:00
Sauyon Lee
66a3116451
pkg/edit: Implement transpose-char
2021-11-07 14:50:57 +00:00
Sauyon Lee
7ec375e583
pkg/edit: Add makeTransform helper for modifying content and dot
2021-11-07 14:50:57 +00:00
Sauyon Lee
56cfb06f9a
pkg/edit: Factor out some word logic into helper functions
2021-11-07 14:50:57 +00:00
Qi Xiao
c1dce661b7
Fix use of the builtin module via explicit "builtin".
...
Some of the variables are added after the Evaler is created, but that change was
not synchronized back to the copy of the builtin module that is imported with
"use builtin".
This fixes #1414 .
2021-10-28 22:28:13 +01:00
Qi Xiao
d71e52cbd7
Refactor the API of eval.NsBuilder to be completely based on methods.
2021-10-23 21:44:11 +01:00
Qi Xiao
db68e4e87d
pkg/shell: Increase the waiting time for daemon in test.
2021-10-23 19:50:46 +01:00
Qi Xiao
1c39c2ed97
pkg/shell: Make sure that a test can finish if the daemon doesn't stop.
2021-10-23 18:41:38 +01:00
Qi Xiao
74003a7f56
pkg/daemon: Always quit after receiving a signal.
...
The current code will busy-loop after receiving a signal until the listener
errors or all existing connection returns.
2021-10-23 18:39:55 +01:00
Qi Xiao
b570b2f0b5
pkg/eval: Clean up the Ns type a bit.
2021-10-23 18:18:31 +01:00
Qi Xiao
41cbcfb1b1
Move elvdoc for the re module to the Go source.
2021-10-23 13:31:44 +01:00
Qi Xiao
0fd916c418
Document the &max option of str:split.
2021-10-23 13:19:14 +01:00
Qi Xiao
a25809893e
Clean up flags
...
- Remove the now defunct -web and -port flags.
- Document that -json also works with -compileonly.
2021-10-23 13:04:26 +01:00
Qi Xiao
b42cfaea61
Remove references to ~/.elvish in documentation.
...
This fixes #1399 .
2021-10-23 12:16:50 +01:00
Qi Xiao
a91852b0a7
Fix tests broken by last commit.
2021-10-22 17:44:57 +01:00
Qi Xiao
fc66ad1d10
pkg/eval/vals: Remove support for the legacy a:b slice syntax.
...
This syntax was deprecated in 0.15.0 and no longer documented since then.
2021-10-22 17:41:09 +01:00
Qi Xiao
b12c29fb53
pkg/eval: Remove unnecessary methods of *Ns and *staticNs.
2021-10-16 12:50:45 +01:00
Qi Xiao
6822e2ca7b
Deprecate the local: and up: special namespaces in 0.17.
...
Also deprecate the use of a leading empty namespace.
This addresses #1409 .
2021-10-15 22:45:02 +01:00
Qi Xiao
4b218d9859
Deprecate the legacy lambda syntax from 0.17.x.
...
This addresses #664 .
2021-10-14 23:10:29 +01:00
Qi Xiao
6a92571a23
Check assignments to read-only variable during compilation.
2021-10-13 23:57:14 +01:00
Qi Xiao
20e98c7479
Support new lambda syntax { |arg &opt=default| body }.
...
This addresses #664 .
2021-10-13 22:47:16 +01:00
Qi Xiao
569d73c270
Deprecate the legacy assignment form from 0.17.0.
...
This addresses #645 .
2021-10-12 23:25:45 +01:00
Qi Xiao
6a7d99041d
pkg/eval: Require the variable used in "set" to already exist.
...
This has always been the documented behavior, but up until this point, "set"
actually behaved like the legacy assignment form, which creates the variable if
it doesn't exist yet.
This fixes the discrepancy. Addresses #645 .
2021-10-10 14:31:09 +01:00
Qi Xiao
862cf5619d
Support turning off implicit external command resolution.
...
See documentation in website/ref/language.html.
This fixes #978 .
2021-10-07 01:21:28 +01:00
Qi Xiao
5b490475e7
pkg/testutil: ScaledMs -> Scaled, takes a time.Duration instead.
2021-10-05 01:02:54 +01:00
Qi Xiao
e299010be8
pkg/eval: Export the config fields and remove access methods.
2021-10-05 00:53:38 +01:00
Qi Xiao
fc754f6822
pkg/eval: Deliver message for finished bg job using editor notification.
...
This fixes #1067 .
2021-10-05 00:08:14 +01:00
Qi Xiao
e70216421f
pkg/eval: Remove more unnecessary mutex guards.
2021-10-04 23:27:06 +01:00
Qi Xiao
cfaa1ed639
Fix build on Windows
2021-10-04 00:26:48 +01:00
Qi Xiao
6eae543ecf
pkg/eval: Remove unnecessary mutex guards.
2021-10-03 23:57:26 +01:00
Qi Xiao
1f362db665
pkg/eval: Add before-exit hook for daemon cleanup.
...
The daemon client in the Evaler is now only used by the dir-history builtin
command and can be removed when it is removed.
2021-10-03 23:16:20 +01:00
Qi Xiao
56038311da
pkg/eval: Remove elvdoc for the removed path-* commands.
2021-10-03 23:03:52 +01:00
Qi Xiao
7e526534cd
pkg/eval: Remove Eval.libInstallDir; it's not used anywhere.
2021-10-03 23:01:26 +01:00
Qi Xiao
64b52d08aa
pkg/edit: Correct the elvdoc for edit:notify.
2021-10-03 22:58:45 +01:00
Qi Xiao
c6d9ebc389
Add special command "coalesce".
...
This fixes #1404 .
2021-10-03 19:14:44 +01:00
Qi Xiao
0571db69e2
Remove commands deprecated in 0.16.0, and deprecate dir-history.
2021-10-03 16:47:51 +01:00
Qi Xiao
2e6a3abce5
Expose all functionalities of the persistent store in the store: module.
...
This fixes #1032 .
2021-10-03 16:34:52 +01:00
Qi Xiao
68168da9fc
pkg/eval: Convert elements of slice return value from a GoFn to individual outputs.
2021-10-03 16:34:52 +01:00
Qi Xiao
b17e5bd1ad
pkg/shell: Remove an unnecessary import rename.
2021-10-03 14:47:22 +01:00