Você já respondeu sua própria pergunta:
nicolas@host:~$ help help
help: help [-s] [pattern ...]
Display helpful information about builtin commands. If PATTERN is
specified, gives detailed help on all commands matching PATTERN,
otherwise a list of the builtins is printed. The -s option
restricts the output for each builtin command matching PATTERN to
a short usage synopsis.
A ajuda é um comando BUILTIN (significa, bash internal command) para obter informações de outros comandos internos. Já que este script de terceira parte não é um comando interno do bash. Se você executar bash
, chame o help
de um uso strace
que você obterá:
# strace bash -i -c "help cd"
---snip(long output)---
write(1, "cd: cd [-L|-P] [dir]\n"..., 21cd: cd [-L|-P] [dir]
) = 21
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f38b765c000
read(3, "# Locale name alias data base.\n# "..., 4096) = 2570
read(3, ""..., 4096) = 0
close(3) = 0
munmap(0x7f38b765c000, 4096) = 0
open("/usr/share/locale/pt_BR/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/pt/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/bash.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, " Change the current directory "..., 710 Change the current directory to DIR. The variable $HOME is the
default DIR. The variable CDPATH defines the search path for
the directory containing DIR. Alternative directory names in CDPATH
are separated by a colon (:). A null directory name is the same as
the current directory, i.e. '.'. If DIR begins with a slash (/),
then CDPATH is not used. If the directory is not found, and the
shell option 'cdable_vars' is set, then try the word as a variable
name. If that variable has a value, then cd to the value of that
variable. The -P option says to use the physical directory structure
instead of following symbolic links; the -L option forces symbolic links
) = 710
write(1, " to be followed.\n"..., 20 to be followed.
) = 20
---snip(long output)---
Significa que essa informação é gerada no momento da criação dentro do binário bash.