Commit Graph

5031 Commits

Author SHA1 Message Date
Qi Xiao
d27cee0724 pkg/edit: Update error message to refer to just "show" instead of "exc:show". 2020-10-23 12:36:24 +01: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
Kurtis Rader
0c30310167 Produce actual diffs when running make checkstyle
Resolves #1117
2020-10-22 15:26:51 +01:00
Qi Xiao
2cf7f8f0ec Small wording fix for Effective Elvish. 2020-10-10 22:47:56 +01:00
Qi Xiao
318efef553 Remove the "binding" bundled module.
It is some leftover code from the old editor and is no longer used.
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
864097a4ce Update elvdocs referencing deprecated splits 2020-10-10 22:44:00 +01:00
Scott Reeves
c5e2069e65 Update "Effective Elvish" for deprecated functions 2020-10-10 22:44:00 +01:00
Kurtis Rader
7bbf75756c Replace "kr" package dependency with "creack"
I was working on issue #661 and noticed that github.com/kr/pty was dead
when I ran into a problem with that module on macOS (GOARCH == darwin).
Replace that dependency with github.com/creack/pty which is ostensibly
being actively maintained.

I also chose to remove a couple of obsolete module signatures at the
same time.
2020-10-10 22:41:09 +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
Qi Xiao
672f097a2c pkg/eval: Break up value.go. 2020-10-10 22:28:13 +01:00
Qi Xiao
734eb955e2 pkg/eval: Use exported methods to access ports from builtin functions. 2020-10-10 22:28:13 +01:00
Kurtis Rader
10085080f2 Fix typos and clarify wording 2020-10-10 22:27:45 +01:00
Qi Xiao
5ec11cfe2b Update docs for $_ and $nil. 2020-09-04 22:45:04 +01:00
Qi Xiao
5cb2a83959 website/ref/language.md: Fix typo. 2020-09-04 22:41:32 +01:00
Qi Xiao
bd1348e6c8 pkg/fsutil: Add correct build tag to search_unix_test.go. 2020-09-04 22:36:52 +01:00
Qi Xiao
a88ac31b39 pkg/eval: De-export PwdVariable. 2020-09-04 22:32:41 +01:00
Qi Xiao
948432e766 pkg/eval: De-export GoFn. 2020-09-04 22:30:42 +01:00
Qi Xiao
f1efae4f5f pkg/eval: De-export EnvList. 2020-09-04 22:24:24 +01:00
Qi Xiao
2af7361bd5 pkg/eval: De-export Closure. 2020-09-04 22:18:50 +01:00
Qi Xiao
ad9c93df9d pkg/eval: Styled -> styled. 2020-09-04 22:15:29 +01:00
Qi Xiao
9df62a6dc9 pkg/eval: Remove unused PurelyEvalCompound. 2020-09-04 22:15:15 +01:00
Qi Xiao
72d7c5c595 pkg/eval: Minor godoc edits. 2020-09-04 22:10:47 +01:00
Qi Xiao
b986d80a49 pkg/eval: Move EachExternal to the fsutil package. 2020-09-04 22:04:20 +01:00
Qi Xiao
f3c2185dae pkg/eval/evaltest: Move Must* functions to the testutil package.
Also exclude those functions from test coverage calculation.
2020-09-04 21:57:20 +01:00
Qi Xiao
03f543a9b9 pkg/eval: Use util.ApplyDir in a test. 2020-09-04 21:50:13 +01:00
Qi Xiao
d27e7ee254 pkg/testutil: Remove InTestDirWithSetup. 2020-09-04 21:42:19 +01:00
Qi Xiao
27fa20d65e pkg/eval: Move ChopLineEnding to the strutil package.
Also add unit tests.
2020-09-04 21:16:06 +01:00
Qi Xiao
9b9a6de2cd pkg/eval: Cause -> Reason. 2020-09-04 21:04:58 +01:00
Qi Xiao
bd33459eaf pkg/eval/evaltest: Move value and error matching code to separate file. 2020-09-04 20:55:19 +01:00
Qi Xiao
90a99c1792 pkg/eval/evaltest: Consolidate all the Throws* methods into one. 2020-09-04 20:31:47 +01:00
Qi Xiao
b271a85279 pkg/eval/evaltest: Move InTempHome to pkg/testutil. 2020-09-03 06:55:14 +01:00
Qi Xiao
bb122024dd pkg/eval: Move test framework into new evaltest package. 2020-09-03 06:51:21 +01:00
Qi Xiao
fca1621294 pkg/eval: Export the StackTrace type. 2020-09-03 05:54:32 +01:00
Qi Xiao
b6580edaf7 Add .codecov.yml, ignore all test helpers. 2020-09-03 05:40:39 +01:00
Qi Xiao
11898f763a pkg/util: Break into fsutil/ and logutil/. 2020-09-03 05:27:18 +01:00
Qi Xiao
735b1cf973 pkg: Move util/feed.go to eval/vals. 2020-09-03 05:22:44 +01:00
Qi Xiao
4083820718 pkg/util: Remove unused math utilities. 2020-09-03 05:20:03 +01:00
Qi Xiao
53dfbe21b3 pkg/eval/vals: Simply use math.MinInt32 for NoPretty. 2020-09-03 05:19:33 +01:00
Qi Xiao
6dd122107c pkg: Move multierror.go from util/ to diag/. 2020-09-03 05:12:55 +01:00
Qi Xiao
eae14f91b9 pkg: Move camel_to_dashed from util/ to strutil/. 2020-09-03 05:10:59 +01:00
Qi Xiao
ee62608e88 pkg: Move string utilities from util/ to strutil/.
Also remove unused functions.

There were two (correct) implementations of deciding whether a string has
another string as a subsequence; keep the more performant one.
2020-09-03 05:08:01 +01:00
Qi Xiao
48919bcb24 pkg/: Move test utilities from util/ to testutil/. 2020-09-03 04:55:16 +01:00
Qi Xiao
c9d037bac7 pkg/util: Remove unused DeepPrint. 2020-09-03 04:47:43 +01:00
Qi Xiao
80dcc22bc8 pkg/cli: apptest/ -> clitest/. 2020-09-03 04:44:55 +01:00
Qi Xiao
eb9638fc16 pkg/eval: Move modules into a mods directory. 2020-09-03 04:31:04 +01:00
Kurtis Rader
0f6b4bb737 Test $pwd behavior
Related #1062
Resolves #1120
2020-09-03 04:25:38 +01:00
Kurtis Rader
b5b3a0d607 go vet cleanup
Most of the code uses keyed fields in composite literals; i.e., struct
literals. However, running `go vet ./...` reports a few places that use
anonymous fields. This modifies those composite literals to use keyed
fields. This does make the code a bit more verbose without reducing
the likelihood of a bug. But it does make the code more consistent, use
best practices, and make it easier to notice if a potential problem is
introduced when running `go vet ./...` since that command now produces
no diagnostic output.

I considered adding a `make vet` target that explicitly ran

    go vet -composites=false ./...

I decided not to do that since consistently using keyed composite literals
is preferable to having a mix of keyed and unkeyed composite literals.

This also removes the unused `ExampleLoop` function which causes this
`go vet` warning:

    pkg/cli/loop_test.go:130:1: ExampleLoop refers to unknown identifier: Loop
2020-09-03 04:24:06 +01:00
Qi Xiao
e28a7d766b pkg/eval: Small fixup for ExternalCmd tests. 2020-09-03 04:16:29 +01:00