Bash builtin command

Autocomplete

Bash command completion (autocomplete), is a built-in bash function.
See man complete or man bash in the 'complete' section.

By default, bash does not autocomplete bash aliases. Here is a feature request filed for it:
http://savannah.gnu.org/support/index.php?108476

See also:
http://linux.overshoot.tv/app-shells/bash-completion

/usr/share/bash-completion
/etc/bash_completion.d/

It is said that the zsh shell has a more powerful, flexible command autocompletion implementation than bash.

Not all bash builtin commands have their man page

Having man pages for bash builtin commands is convenient.
man echo provides the man page for the bash command 'echo'.

Some/most builtin commands do not have their own man page.
e.g. man read give man 2 read, which is about a c++ library. There is no man page for man 1 read (bash's read).

The official bash documentation is unwieldy.

Currently, my info pages are broken: #5475: The Info node shell builtin commands in Info file /usr/share/info/bash.info does not exist.

bash: let

Documented in the 'SHELL BUILTIN COMMANDS' section of man bash or here:
http://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html

#!/bin/bash
loaded="configuration_file"

# The following will not work because the script will try to run the non-existing command 'configuration_file'
# $loaded=1
# However, this works:
let $loaded=1

For an alphanumeric string, use declare:

  # -g makes the variable global.
  declare -g $1=$2

Errors

Syndicate content