浏览代码

Remove use of "e.g.," and "i.e.,".

Some of the uses are replaced by plain English phrases like "such as", and the
remaining have the trailing commas removed.
Qi Xiao 1 年之前
父节点
当前提交
6c6797b4c1
共有 7 个文件被更改,包括 20 次插入14 次删除
  1. 2 1
      0.19.0-release-notes.md
  2. 5 3
      pkg/eval/builtin_fn_fs.go
  3. 6 3
      pkg/eval/external_cmd_unix_test.go
  4. 1 1
      pkg/eval/options.go
  5. 2 2
      pkg/ui/key.go
  6. 2 2
      website/ref/edit.md
  7. 2 2
      website/ref/language.md

+ 2 - 1
0.19.0-release-notes.md

@@ -9,7 +9,8 @@ This is the draft release notes for 0.19.0, scheduled to be released around
 -   Symbolic links are now always treated as ordinary files by the global
     modifiers `type:dir` and `type:regular` in wildcard expansions.
 
--   Support for shared vars has been removed; e.g., `store:shared-var`.
+-   Support for shared vars has been removed, along with its API
+    (`store:shared-var`, `store:set-shared-var` and `store:del-shared-var`).
 
 # Deprecated features
 

+ 5 - 3
pkg/eval/builtin_fn_fs.go

@@ -23,9 +23,11 @@ func init() {
 // cd $dirname
 // ```
 //
-// Change directory. This affects the entire process; i.e., all threads
-// whether running indirectly (e.g., prompt functions) or started explicitly
-// by commands such as [`peach`](#peach).
+// Changes directory.
+//
+// This affects the entire process, including parallel tasks that are started
+// implicitly (such as prompt functions) or explicitly (such as one started by
+// [`peach`](#peach)).
 //
 // Note that Elvish's `cd` does not support `cd -`.
 //

+ 6 - 3
pkg/eval/external_cmd_unix_test.go

@@ -7,8 +7,11 @@ import (
 )
 
 func exitWaitStatus(exit uint32) syscall.WaitStatus {
-	// The exit<<8 is gross but I can't find any exported symbols that would
-	// allow us to construct WaitStatus. So assume legacy UNIX encoding
-	// for a process that exits normally; i.e., not due to a signal.
+	// There doesn't seem to be a portable way to construct a WaitStatus, but
+	// all Unix platforms Elvish supports have 0 in the lower 8 bits for normal
+	// exits, and put exit codes in the higher bits.
+	//
+	// https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/syscall/syscall_linux.go;l=404-411;drc=946b4baaf6521d521928500b2b57429c149854e7
+	// https://cs.opensource.google/go/go/+/master:src/syscall/syscall_bsd.go;l=89-93;drc=51297dd6df713b988b5c587e448b27d18ca1bd8a
 	return syscall.WaitStatus(exit << 8)
 }

+ 1 - 1
pkg/eval/options.go

@@ -38,7 +38,7 @@ func scanOptions(rawOpts RawOptions, ptr any) error {
 			return UnknownOption{k}
 		}
 
-		// An option with no value (e.g., `&a-opt`) has `$true` as its default value. However, if
+		// An option with no value (e.g. `&a-opt`) has `$true` as its default value. However, if
 		// the option struct member is a string we want an empty string as the default value.
 		switch b := v.(type) {
 		case bool:

+ 2 - 2
pkg/ui/key.go

@@ -195,8 +195,8 @@ func ParseKey(s string) (Key, error) {
 				// since the user has to use the capitalized form when creating a key binding.
 				return Key{}, fmt.Errorf("Ctrl modifier with literal control char: %q", k.Rune)
 			}
-			// Convert literal control char to the equivalent canonical form;
-			// e.g., "\e" to Ctrl-'[' and "\t" to Ctrl-I.
+			// Convert literal control char to the equivalent canonical form,
+			// e.g. "\e" to Ctrl-'[' and "\t" to Ctrl-I.
 			k.Mod |= Ctrl
 			k.Rune += 0x40
 		}

+ 2 - 2
website/ref/edit.md

@@ -204,8 +204,8 @@ M  Meta
 S  Shift
 ```
 
-Modifiers, if present, end with either a `-` or `+`; e.g., `S-F1`, `Ctrl-X` or
-`Alt+Enter`. You can stack modifiers; e.g., `C+A-X`.
+Modifiers end with either a `-` or `+`, such as in `S-F1`, `Ctrl-X` or
+`Alt+Enter`. You can stack modifiers, such as in `C+A-X`.
 
 The key name may be a simple character such as `x` or a function key from these
 symbols:

+ 2 - 2
website/ref/language.md

@@ -1324,8 +1324,8 @@ The first expression in an ordinary command is the command **head**. If the head
 is a single string literal, it is subject to **static resolution**:
 
 -   If a variable with name `head~` (where `head` is the value of the head)
-    exists, the head will evaluate as if it is `$head~`; i.e., a function
-    invocation.
+    exists, the head will evaluate as if it is `$head~` (resulting in a function
+    call).
 
 -   If the head contains at least one slash, it is treated as an external
     command with the value as its path relative to the current directory.