Skip to content

Commit fb723a4

Browse files
authored
docs: Enhance and clarify 'help' command documentation (#374)
* docs: Correct and enhance 'free' command documentation * docs: Enhance and clarify 'help' command documentation
1 parent 13a7630 commit fb723a4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ebook/en/content/011-the-help-command.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Display information about builtin commands.
44

55
If a `PATTERN` is specified, this command gives detailed help on all commands matching the `PATTERN`, otherwise the list of available help topics is printed.
66

7+
> **Quick Tip:** The `help` command only works for commands that are "built-in" to the Bash shell itself (like `cd`, `pwd`, `echo`, `read`). It will not work for standalone programs like `ls`, `grep`, or `find`. To get help for those, you should use the `man` command (e.g., `man ls`).
8+
79
## Syntax
810
```bash
911
$ help [-dms] [PATTERN ...]
@@ -20,12 +22,22 @@ $ help [-dms] [PATTERN ...]
2022
1. We get the complete information about the `cd` command
2123
```bash
2224
$ help cd
25+
cd: cd [-L|[-P [-e]] [-@]] [dir]
26+
Change the shell working directory.
27+
28+
Change the current directory to DIR. The default DIR is the value of the
29+
HOME shell variable.
30+
...
31+
(additional details about options and exit status follow)
2332
```
2433
2. We get a short description about the `pwd` command
2534
```bash
2635
$ help -d pwd
36+
pwd: pwd [-LP]
37+
Print the name of the current working directory.
2738
```
2839
3. We get the syntax of the `cd` command
2940
```bash
3041
$ help -s cd
42+
cd [-L|[-P [-e]] [-@]] [dir]
3143
```

0 commit comments

Comments
 (0)