Skip to content

Commit 1e71410

Browse files
authored
Bash builtins: refresh pages (#19967)
1 parent 09d2d32 commit 1e71410

File tree

21 files changed

+51
-30
lines changed

21 files changed

+51
-30
lines changed

pages/common/[.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
> See also: `test`.
66
> More information: <https://gnu.org/software/bash/manual/bash.html#index-test>.
77
8-
- Test if a given variable is equal/not equal to the specified string:
8+
- Test if a given variable is equal to the specified string:
99

10-
`[ "${{variable}}" {{=|!=}} "{{string}}" ]`
10+
`[ "${{variable}}" = "{{string}}" ]`
11+
12+
- Test if a given variable is not equal to the specified string:
13+
14+
`[ "${{variable}}" != "{{string}}" ]`
1115

1216
- Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number:
1317

pages/common/[[.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
> Returns a status of 0 if the condition evaluates to true, 1 if it evaluates to false.
55
> More information: <https://gnu.org/software/bash/manual/bash.html#index-_005b_005b>.
66
7-
- Test if a given variable is equal/not equal to the specified string:
7+
- Test if a given variable is equal to the specified string or glob:
88

9-
`[[ ${{variable}} {{==|!=}} "{{string}}" ]]`
9+
`[[ ${{variable}} == "{{string}}" ]]`
1010

11-
- Test if a given string conforms the specified glob/`regex`:
11+
- Test if a given string conforms the specified `regex`:
1212

13-
`[[ ${{variable}} {{==|=~}} {{pattern}} ]]`
13+
`[[ ${{variable}} =~ {{pattern}} ]]`
1414

1515
- Test if a given variable is [eq]ual/[n]ot [e]qual/[g]reater [t]han/[l]ess [t]han/[g]reater than or [e]qual/[l]ess than or [e]qual to the specified number:
1616

pages/common/bg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bg
22

3-
> Resume suspended jobs (e.g. using `<Ctrl z>`), and keeps them running in the background.
3+
> Resume suspended jobs (e.g. using `<Ctrl z>`), and keep them running in the background.
44
> See also: `jobs`, `fg`, `disown`.
55
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-bg>.
66

pages/common/command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# command
22

3-
> Command forces the shell to execute the program and ignore any functions, builtins and aliases with the same name.
3+
> Force the shell to execute the program and ignore any functions, builtins, and aliases with the same name.
44
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-command>.
55
66
- Execute the `ls` program literally, even if an `ls` alias exists:

pages/common/continue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# continue
22

3-
> Skip to the next iteration of a `for`, `while`, `until` or `select` loop.
3+
> Skip to the next iteration of a `for`, `while`, `until`, or `select` loop.
44
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-continue>.
55
66
- Skip to the next iteration:

pages/common/enable.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
- Disable a builtin (works in Bash only):
1111

1212
`enable -n {{command}}`
13+
14+
- Re-enable a builtin:
15+
16+
`enable {{command}}`

pages/common/false.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# false
22

33
> Returns a non-zero exit code.
4-
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/false-invocation.html>.
4+
> See also: `true`.
5+
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-false>.
56
67
- Return a non-zero exit code:
78

89
`false`
10+
11+
- Make a command always exit with 1:
12+
13+
`{{command}} && false`

pages/common/fc.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# fc
22

3-
> Open the most recent command for editing and then run it.
3+
> Open the recent commands for editing and then run them.
4+
> See also: `history`.
45
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-fc>.
56
67
- Open the last command in the default system editor and run it after editing:

pages/common/fg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# fg
22

33
> Run jobs in foreground.
4-
> See also: `jobs`, `bg`, `disown`.
4+
> See also: `jobs`, `bg`, `disown`, `%`.
55
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-fg>.
66
77
- Bring most recently suspended or running background job to foreground:

pages/common/for.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
> Perform a command several times.
44
> More information: <https://www.gnu.org/software/bash/manual/bash.html#Looping-Constructs>.
55
6-
- Iterate through command line arguments:
6+
- Iterate through command line parameters:
77

88
`for {{variable}}; do {{echo $variable}}; done`
99

0 commit comments

Comments
 (0)