Skip to content

Commit 16c872f

Browse files
authored
Merge pull request wangdoc#12 from typebrook/read
Add content about 'Readline' into read.md
2 parents df93981 + c1eef35 commit 16c872f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/read.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,18 @@ abc
139139

140140
上面例子中,变量`letter`只包含3个字母。
141141

142-
**(5)其他参数**
142+
* (5) -e 參數*
143+
144+
`-e`參數可開啟`readline`功能,在輸入時可使用快捷鍵。
145+
詳情可參閱行操作。
146+
147+
```bash
148+
# 和-i搭配使用可以填充預設值
149+
$ read -e -i 'abc'
150+
abc
151+
```
152+
153+
**(6)其他参数**
143154

144155
- `-d delimiter`:定义字符串`delimiter`的第一个字符作为用户输入的结束,而不是一个换行符。
145156
- `-r`:raw 模式,表示不把用户输入的反斜杠字符解释为转义字符。

0 commit comments

Comments
 (0)