I am wondering, if there are any REAL man pages for builtin commands of the bash shell. I have found many links like this one:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/break.1.html
however, there is no command-specific information, just a general information about builtin commands, which is quite useless. I want to know what options has each command, what arguments does it accept etc.
Someone has found?
thanks, Radek
ThreeDee
03-31-2006, 07:43 AM
usually you type in
man <command>
where <command> is like gzip, emacs, and other commands.
hayne
03-31-2006, 07:46 AM
All the 'bash' builtin commands are covered under the man page for 'bash' itself. So read 'man bash'
It will seem intimidatingly large, but you can search by typing a slash (/) and then the text you want to search for.
Or look on the main macosxhints site for one of the utilities (e.g. Bwana) that shows man pages in some other way (e.g. in the web browser).
blatny
03-31-2006, 07:49 AM
Yeah, but for builtin commands it gives me the same page for all commands - the one, which is copied on the web page I have mentioned above:
[513 12:00 Radek@mutant ~]$ man complete
+ man complete
BUILTIN(1) BSD General Commands Manual BUILTIN(1)
NAME
builtin, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case,
cd, chdir, command, complete, continue, default, dirs, do, done, echo,
echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export,
false, fc, fg, filetest, fi, for, foreach, getopts, glob, goto, hash,
hashstat, history, hup, if, jobid, jobs, kill, limit, log, login, logout,
ls-F, nice, nohup, notify, onintr, popd, printenv, pushd, pwd, read,
readonly, rehash, repeat, sched, set, setenv, settc, setty, setvar,
shift, source, stop, suspend, switch, telltc, test, then, time, trap,
true, type, ulimit, umask, unalias, uncomplete, unhash, unlimit, unset,
unsetenv, until, wait, where, which, while -- shell builtin commands
SYNOPSIS
builtin [-options] [args ...]
DESCRIPTION
Shell builtin commands are commands that can be executed within the run-
ning shell's process. Note that, in the case of csh(1) builtin commands,
the command is executed in a subshell if it occurs as any component of a
pipeline except the last.
If a command specified to the shell contains a slash ``/'', the shell
will not execute a builtin command, even if the last component of the
specified command matches the name of a builtin command. Thus, while
specifying ``echo'' causes a builtin command to be executed under shells
that support the builtin echo command, specifying ``/bin/echo'' or
``./echo'' does not.
While some builtin commands may exist in more than one shell, their oper-
ation may be different under each shell which supports them. Below is a
table which lists shell builtin commands, the standard shells that sup-
port them and whether they exist as standalone utilities.
Only builtin commands for the csh(1) and sh(1) shells are listed here.
Consult the appropriate manual page for details on the operation of any
given builtin command under those shells. Users of other shells will
need to consult the documentation supplied with the other shells.
Command External csh(1) sh(1)
alias Yes Yes Yes
alloc No Yes No
bg Yes Yes Yes
bind No No Yes
bindkey No Yes No
break No Yes Yes
breaksw No Yes No
builtins No Yes No
.
.
.
.
..
.
blatny
03-31-2006, 07:51 AM
That's where they are hidden!
Thank you Hayne
hayne
03-31-2006, 07:52 AM
Yeah, but for builtin commands it gives me the same page for all commands - the one, which is copied on the web page I have mentioned above
I think you are responding to ThreeDee.
See my response above.
Hal Itosis
03-31-2006, 12:29 PM
Look inside this folder to see what's there:
/usr/share/doc/bash/
The file called bashref.html is the holy grail.
-HI-
jrbobdobbs
07-28-2006, 11:32 PM
Just type 'help <builtin_name>', like this:
[me@myhost] ~ [502]$ help cd
cd: cd [-L|-P] [dir]
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
to be followed.
[me@myhost] ~ [503]$