Skip to main content
edited tags
Link
nohillside
  • 104.4k
  • 42
  • 222
  • 275
Tweeted twitter.com/askdifferent/status/834438876122980352
Source Link

Where can I find all the documentation for mac's builtin shell commands?

The OS X Man Pages lists out all builtin functions. But where can I find the documentation of a particular one?

For instance, the command fc, on ubuntu I can get its manual by:

> help fc
fc: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
Display or execute commands from the history list.

fc is used to list or edit and re-execute commands from the history list.
FIRST and LAST can be numbers specifying the range, or FIRST can be a
string, which means the most recent command beginning with that
string.
....

Another example is the if expression, on ubuntu:

> help if
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
Execute commands based on conditional.
...

What am I missing here?