Skip to content

Commit 92e48c5

Browse files
committed
docs(expansion): edit intro
1 parent eda70bc commit 92e48c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/expansion.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Shell 接收到用户输入的命令以后,会根据空格将用户的输入,拆分成一个个词元(token)。然后,Shell 会扩展词元里面的特殊字符,扩展完成后才会调用相应的命令。
66

7-
这种特殊字符的扩展,称为通配符扩展(wildcard expansion)或者模式扩展(globbing)。Bash 一共提供八种扩展,先进行扩展,然后再执行命令
7+
这种特殊字符的扩展,称为模式扩展(globbing)。其中有些用到通配符,又称为通配符扩展(wildcard expansion)。Bash 一共提供八种扩展。
88

99
- 波浪线扩展
1010
- `?` 字符扩展
@@ -23,15 +23,15 @@ Bash 是先进行扩展,再执行命令。因此,扩展的结果是由 Bash
2323

2424
模式扩展与正则表达式的关系是,模式扩展早于正则表达式出现,可以看作是原始的正则表达式。它的功能没有正则那么强大灵活,但是优点是简单和方便。
2525

26-
Bash 允许用户关闭通配符扩展
26+
Bash 允许用户关闭扩展
2727

2828
```bash
2929
$ set -o noglob
3030
# 或者
3131
$ set -f
3232
```
3333

34-
下面的命令可以重新打开通配符扩展
34+
下面的命令可以重新打开扩展
3535

3636
```bash
3737
$ set +o noglob

0 commit comments

Comments
 (0)