... worldwide!
LE FastCounter
Back to Bash module main indexNews about the Bash moduleBash module feed-back from usersA few screen dumpsHomepage of the Dotfile Generator

Latest from the author

My current projects

Bash module 
 


 
Links I've found useful
Personal information
My e-mail address <pzacho@imada.ou.dk>
Return to the CS department af Odense University
Updated 02.04.1998  

Bash module reference guide

Table of contents


Preface

This guide will help you start configuring your Bash shell using the Bash module for the dotfile generator. Using the Bash module/dotfile generator instead of old fashioned "hairy commands"/text editor is obvious although more advanced use of the dotfiles (conditional statements in particular) is not possible (atleast not at the moment). However almost every other aspect of setting up your shell is covered including help as you go along (just press right mouse button when in doubt). Therefore it is not essential you read this guide from beginning to end, but use it as a kind of "reference manual", if further help is needed.

I have structured the contents of this guide, so they correspond to how you will encounter the options in the module remember, you do not have to visit all consecutive configuration pages when setting up your Bash shell; you are welcome to leap back and forth as you wish.

This module is prepared for the new version of Bash, namely version 2.0. I have only had chance to test the output on a version 2.00.0(1)-release of the new Bash shell, but I do not expect major changes with respect to commandnames and usage in future 2.0 releases.

If you have any comments please do not hesitate writing me. My email address is: pzacho@imada.ou.dk, or check out www.imada.ou.dk/bash for updates.

If you wish to know more about the dotfile generator, please turn to www.imada.ou.dk/~blackie/dotfile for further information.

Return to table of contentstable of contents


User/Bash Interface

In this section you can configure options concerning the interaction between User and Bash (i.e. commandline, completion and prompting etc.).

Return to table of contentstable of contents

Prompting

A collection of pages, that will help you setup how Bash is to prompt you.

Return to table of contentstable of contents

Generel

This configuration page covers generel options concerning prompting.

Return to table of contentstable of contents

Command(s) to execute before primary prompt

You can make Bash execute one or several command(s) before issuing a primary prompt.

Output
Options: (extentry)X != ""(*) X == ""
Bash 1.4.14export PROMPT_COMMANDS=Xunset PROMPT_COMMANDS
Bash 2.0export PROMPT_COMMANDS=Xunset PROMPT_COMMANDS
(*) is default

Return to table of contentstable of contents

Expansion of prompting variables

If this option is set, prompt strings undergo variable and parameter expansion after being expanded.

Output
Options: (checkbox)off(*) on
Bash 1.4.14n/an/a
Bash 2.0shopt -u promptvarsshopt -s promptvars
(*) is default

Return to table of contentstable of contents

Primary prompt

Here you can configure the primary prompt (prompt 1), which will be printed before reading your commands.

Output
Options: (fillout)
Bash 1.4.14export PS1=X
Bash 2.0export PS1=X

Return to table of contentstable of contents

Secondary prompt

Here you can configure the secondary prompt (prompt 2), which will be printed if the commandline is stretched over more than one line. The prompt will not be displayed if commandline wraps, or commandline scroll, but if you hit ENTER, and Bash expects further information to execute the command.

Output
Options: (fillout)
Bash 1.4.14export PS2=X
Bash 2.0export PS2=X

Return to table of contentstable of contents

Prompt 3

Here you can configure the third prompt (prompt 3), which is used in connection with the builtin command select (when waiting for user input).

Output
Options: (fillout)
Bash 1.4.14export PS3=X
Bash 2.0export PS3=X

Return to table of contentstable of contents

Prompt 4

Here you can configure the fourth prompt (prompt 4), which is used in connection with tracing shell scripts/commands with builtin xtrace. After expanding a simple-command, Bash will display the value of PS4, followed by the command and its expanded arguments.

Output
Options: (fillout)
Bash 1.4.14export PS4=X
Bash 2.0export PS4=X

Return to table of contentstable of contents

Command aliases

UNIX often have commands with very cryptic names, or numerous arguments you have to remember/type each time you use the command/program. With aliases you are saved from that kind of annoyances. If you are familiar with C shells (like Tcsh), the major difference is you cannot use arguments in alias expansions--the alias function in Bash can be compared with search-and-replace. The use of arguments is provided by functions, a sort of script-within-a-script, which you can use to define some shell code by name and store it in the shell's memory, to be invoked and run later. Due to the versatility of functions, you can not define functions (--maybe in a later version), but are you interested in writing shell functions, I can recommend the book Learning the bash Shell.

Output
Options: (extentry)
Bash 1.4.14alias name=command(s)
Bash 2.0alias name=command(s)

Return to table of contentstable of contents

Command history

This configuration page will help you setup the history function of Bash. The history mechanism records your commands, and is very useful if you make a mistake. Instead of retyping the entire commandline, you just recall the command, fix the mistake and re-execute the command. Bash has several ways to edit old commands; either by using incremental search for a single commandline by using up and down cursor keys, or using the builtin fc (fix command) command.

History file (to place previous commands)

Specify a file to save history entries in, when terminating Bash.

Output
Options: (filedirbrowser)X != "~/.bash_history"(*) X == "~/.bash_history"
Bash 1.4.14export HISTFILE=X
Bash 2.0export HISTFILE=X
(*) is default

Return to table of contentstable of contents

Append to an existing history file

When saving history entries, Bash can append the information to an already existing history file.

Output
Options: (checkbox)offon
Bash 1.4.14n/an/a
Bash 2.0shopt -u histappendshopt -s histappend

Return to table of contentstable of contents

Commands to ignore when memorizing

To avoid duplicate commands in the history list, or if you wish to control what is memorized, you can use this option. You can put restrictions on what is stored in the history list; ignore commands with a prepend space or ignore commands that is duplicate of previous, and a combination of both.

Output
Options: (menu)(*) noneprepending spacesduplicate of previousboth
Bash 1.14.4unset HCexport HC=ignorespaceexport HC=ignoredupsexport HC=ignoreboth
Bash 2.0unset HCexport HC=ignorespaceexport HC=ignoredupsexport HC=ignoreboth
(*) is default
HC=HISTCONTROL

Return to table of contentstable of contents

Size of history list in memory

You can specify how many history entries to store in shell memory.

Output
Options: (integer entry)X != 500(*) X == 500
Bash 1.14.4export HISTSIZE=X
Bash 2.0export HISTSIZE=X
(*) is default

Return to table of contentstable of contents

Size history file (in lines)

You can specify how many history entries to save when terminating shell. Remember, that you should not save more entries than stored in shell memory.

Output
Options: (integer entry)X != 500(*) X == 500
Bash 1.4.14export HISTFILESIZE=X
Bash 2.0export HISTFILESIZE=X
(*) is default

Return to table of contentstable of contents

With the builtin 'fc' you can edit commands...

You can edit several commands at the same time, using the fc builtin command (see BASH(1) manual page for further information about fc). For this purpose, Bash can start your favorite editor, or just use the default editor, specified by the system variable EDITOR.

Output
Options: (radio)(*) Use default editorUse different editor
Bash 1.14.4unset FCEDITexport FCEDIT=X
Bash 2.0unset FCEDITexport FCEDIT=X
(*) is default(X is defined below)

Return to table of contentstable of contents

Location of prefered editor

If you should prefer a different editor from the default, when editing history entries with fc, you can specify the path and editor name here. Remember to use the complete path name.

Output
Options: (entry)
Bash 1.14.4X=/path/editor
Bash 2.0X=/path/editor
(X is used above)

Return to table of contentstable of contents

Save multiple-line commands in one entry

If set, Bash will try to store multiple-line commands in a singe history entry.

Output
Options: (checkbox)(*) off on
Bash 1.14.4unset command_oriented_historyexport command_oriented_history=on
Bash 2.0shopt -u cmdhistshopt -s cmdhist
(*) is default

Return to table of contentstable of contents

Command delimiter when saving multiple-line commands

When Bash saves multiple-line commands in one history entry, you can specify how commands are saved in the history file. It is more comfortable to edit many lines with embedded newlines as delimiter, when using an editor, as to scroll for- and backwards through the commands. (Readline--the commandline editor in Bash, will accept the line even if it has embedded newlines (the command occupies several consecutive lines) instead of semicolons (one line wrapped at screen right edge).)

Output
Options: (radio)(*) semicolonnewline
Bash 1.14.4n/an/a
Bash 2.0shopt -u lithistshopt -s lithist
(*) is default

Return to table of contentstable of contents

Mark modified history lines

When recalling and modifieng a history entry, the shell will add an asterisk at the beginning of the commandline. This indicates the history entry has been altered, but not yet executed.

Output
Options: (checkbox)(*) offon
Bash 1.14.4set mark-modified-lines offset mark-modified-lines on
Bash 2.0set mark-modified-lines offset mark-modified-lines on
(*) is default.(written to inputrc file)(written to inputrc file)

Return to table of contentstable of contents

Allow re-edit of failed history substitution

If set, and readline is being used, a user is given the opportunity to re-edit a failed history substitution.

Output
Options: (checkbox)(*) offon
Bash 1.14.4n/an/a
Bash 2.0shopt -u histreeditshopt -s histreedit
(*) is default

Return to table of contentstable of contents

History character for expansion

This character is the history expansion character, that is, the character which signals the start of a history expansion, normally '!'. History expansion is performed immediately after a complete line is read, before the shell breaks it into words. It takes place in two parts. The first is to dermine which line from the previous history to use during substitution. The second is to select protions of that line for inclusion intor the current one. An event designator is a reference to a command line entry in the history list, and here is a few (--see them in BASH(1) manual):

!Start a history substitution, except when followed by a blank, newline, = or (
!!Refer to the previous command. This is a synonym for '!-1'
!nRefer to command line n
!-nRefer to the current command line minus n
!#The entire command line typed so far

Output
Options: (entry)X != "!"
Bash 1.14.4export histchars=Xyz
Bash 2.0export histchars=Xyz
(y and z are defined below)

Return to table of contentstable of contents

History character for substitustion

This character is the quick substitution character, which is used as shorthand for re-running the previous command entered, substituting one string for another in the command.

Output
Options: (entry)X != "^"
Bash 1.14.4export histchars=xYz
Bash 2.0export histchars=xYz
(x is defined above, z below)

Return to table of contentstable of contents

History character for "comment"

This character is optional, and signifies that the remainder of the line is a comment, when found as the first character of a word. The history comment character causes history substitution to be skipped for the remaining words on the line. It does not necessarily cause the shell parser to treat the rest of the line as a comment.

Output
Options: (entry)X != ""
Bash 1.14.4export histchars=xyZ
Bash 2.0export histchars=xyZ
(x and y are defined above)

Return to table of contentstable of contents

Commandline

This configuration page will help you setup options concerning the commandline. In particular which editing mode is prefered, how to respond to scripts, etc.

Select which editor keybindings Bash is to use

You can specify how Bash commandline editor is to emulate well known editors.

Output
Options: (radio)(*) emacsvi
Bash 1.14.4set -o emacs
set editing-mode emacs
set -o vi
set editing-mode vi
Bash 2.0set -o emacs
set editing-mode emacs
set -o vi
set editing-mode vi
(*) is default(last option saved to inputrc)(last option saved to inputrc)

Return to table of contentstable of contents

Keymap for commandline editor

Here you can specify how the commandline editor will bind keys. The above does have influence on the this setting, and usually setting the above will do. The difference is constrained to how keystrokes will be interpreted. The following list will show you the difference between emacs and vi commands:

Emacs commandvi commandMeaning
CTRL-A0Move to beginning of line
CTRL-BhMove backward one character
CTRL-Ddl or xDelete one character forward
CTRL-E$Move to end of line
CTRL-FlMove forward one character
CTRL-G
Abort the current editing command and ring the terminal bell
CTRL-J
Same as RETURN
CTRL-Kd$ or DDelete (kill) forward to end of line
CTRL-LCTRL-LClear screen and redisplay the line
CTRL-M
Same as RETURN
CTRL-N
Next line in command history
CTRL-O
Same as RETURN, then display next line in history file
CTRL-P
Previous line in command history
CTRL-RNSearch backward
CTRL-SnSearch forward
CTRL-T
Transpose two characters
CTRL-Ud0Kill backward from point to the beginning of line
CTRL-V
Make the next character typed verbatim
CTRL-V TAB
Insert a TAB
CTRL-W
Kill the word behind the cursor, using whitespace as the boundary
CTRL-X /
List the possible filename completions of the current word
CTRL-X ~
List the possible username completions of the current word
CTRL-X $
List the possible shell variable completions of the current word
CTRL-X @
List the possible hostname completions of the current word
CTRL-X !
List the possible command name completions of the current word
CTRL-X (
Begin saving characters into the current keyboard macro
CTRL-X )
Stop saving characters into the current keyboard macro
CTRL-X e
Re-execute the last keyboard macro defined
CTRL-X CTRL-R
Read in the contents of the Readline initialization file
CTRL-X CTRL-V
Display version information on the instance of Bash
CTRL-Y
Retrieve (yank) last item killed
DELdh or XDelete one character backward
CTRL-[
Same as ESC (most keyboards)
ESC bbMove one word backward
ESC c
Change word after point to all capital letters
ESC ddwDelete one word forward
ESC fwMove one word forward
ESC l~Change word after point to all lowercase letters
ESC n
Non-incremental forward search
ESC p
Non-incremental reverse search
ESC r
Undo all the changes made to this line
ESC t
Transpose two words
ESC u~Change word after point to all uppercase letters
ESC CTRL-E
Perform shell alias, history, and word expansion on the line
ESC CTRL-HdbDelete one word backward
ESC CTRL-Y
Insert the first argument to the previous command (usually the second word) at point
ESC DELdbDelete one word backward
ESC ^
Perform history expansion on the line
ESC <
Move to first line of history file
ESC >
Move to last line of history file
ESC .
Insert last word in previous command line after point
ESC _
Same as above
TAB
Attempt filename completion on current word
ESC ?
List the possible completions of the text before point
ESC /\Attempt filename completion on current word
ESC ~
Attempt username completion on current word
ESC $
Attempt variable completion on current word
ESC @
Attempt hostname completion on current word
ESC !
Attempt command name completion on current word
ESC TAB
Attempt completion from text in the command history
ESC ~
Attempt tilde expansion on the current word
ESC {
Attempt filename completion and return the list to the shell enclosed within braces

WMove to beginning of next non-blank word

BMove to beginning of preceding non-blank word

eMove to end of current word

EMove to end of current non-blank word

^Move to first non-blank character in line

iInsert text before current character

aInsert text after current character

IInsert text at beginning of line

AInsert text at end of line

ROverwrite existing text

dBDelete one non-blank word backwards

dWDelete one non-blank word forwards

ddEquivalent to 0d$ (delete entire line)

CEquivalent to c$ (delete to end of line, enter input mode)

ccEquivalent to 0c$ (delete entire line, enter input mode)

k or -Move backward one line

j or +Move forward one line

GMove to line given by repeat count

/stringSearch forward for string

?stringSearch backward for string

fxMove right to next occurrence of x

FxMove left to previous occurrence of x

txMove right to next occurrence of x, then back one space

TxMove left to previous occurrence of x, then forward one space

;Redo last character finding command

,Redo last character firnding command in opposite direction

*Do wildcard expansion (onto command line)

\=Do wildcard expansion (as printed list)

\_Append last word of previous command, enter input mode

#Prepend # (comment character) to the line and send it
(Source: Learning the bash Shell by Cameron Newham & Bill Rosenblatt (© 1995 O'Reilly & Associates, Inc)

Output
Options:
(menu)
(*) emacsemacs- stnd.emacs- metaemacs- ctlxvivi-movevi-com.vi-insert
Bash 1.14.4set keymap emacsset keymap emacs- standardset keymap emacs- metaset keymap emacs- ctlxset keymap viset keymap vi- moveset keymap vi- commandset keymap vi- insert
Bash 2.0set keymap emacsset keymap emacs- standardset keymap emacs- metaset keymap emacs- ctlxset keymap viset keymap vi-moveset keymap vi-commandset keymap vi- insert
(*) is defaultsaved in inputrcsaved in inputrcsaved in inputrcsaved in inputrcsaved in inputrcsaved in inputrcsaved in inputrcsaved in inputrc

Return to table of contentstable of contents

Use IEEE 1003.2 Posix shell standard

The Posix standard is yet another attempt to standardize UNIX. The first work, called IEEE P1003.1, was published in 1988, and covers low-level issues at the system-call level. In 1992, IEEE P1003.2 covering the shell, utility programs, and user interface issues, was ratified after six years of effort (the complete P1003.2 standard occupies about 2,000 pages, and is product of accommodating designs of existing shell code written under various Bourne-derived shells). The Posix standards are flexible, but most UNIX vendors currently comply with the POSIX 1003.1 standard, and undoubtly adhere to the POSIX 1003.2 in future releases. Anyway, Bash is nearly 100% POSIX compatible, and will work toward full compliance in future releases.

The Posix standard support functions, but the semantics are weaker: it is not possibel to define local variables, and functions cannot be exported. Also command lookup order has been changed to allow certain built-in commands to be overridden by functions since aliases are not included in the standard. Built-in commands are devided into two sets by thir positions in the command lookup order: some are processed before funtions, some after. Specifically, the built-in commands break, : (do nothing), continuem, . (source), eval, exec, exit, export, readonly, return, set, shift, trap, and unset take priority over functions.

All in all, Posix standard differs (from non-Posix?) in the way command lookup and funtion handling takes place. It is only in very rare circumstances you would ever have to use the posix mode.

Output
Options: (checkbox)(*) off (non-Posix mode)on (Posix mode)
bash 1.14.4set +o posixset -o posix
bash 2.0set +o posixset -o posix
(*) is default

Return to table of contentstable of contents

Allow interactive comments

When writing shell scripts, one often uses comments (#) in order to explain what a specific command or piece of program does. However, when a shellscript is executed, the interactive shell will start a new instance of itself, with the shellscript as input. (This shell is not interactive as, for instance, your login shell.) In an interactive shell, you can force the shell to evaluate lines (or words) that has a prefix "#".

Output
Options: (checkbox)off (Disallow comments)(*) on (Allow comments)
bash 1.14.4n/an/a
bash 2.0shopt -u interactive_commentsshopt -s interactive_comments
(*) is default
(Prior to version 2.0, interactive comments are always allowed.)

Return to table of contentstable of contents

Display shell commands before running them

All shell commands either user typed, or shell scripts, will be echoed to screen.

Output
Options: (checkbox)(*) off (silent)on (verbose)
bash 1.14.4set +o verboseset -o verbose
bash 2.0set +o verboseset -o verbose
(*) is default

Return to table of contentstable of contents

Display shell commands after command-line processing

Prints the shell commands, after they have been expanded. In contrast to previous, commands are writtes as shell will execute them (i.e. aliases, variables, etc. have been expanded to commands, paths, etc.)

Output
Options: (checkbox)(*) off (no trace)on (trace)
bash 1.14.4set +o xtraceset -o xtrace
bash 2.0set +o xtraceset -o xtrace
(*) is default

Return to table of contentstable of contents

Check command hash table, before searching path

If set, Bash checks that a command found in the hash table exists before trying to execute it. If a hashed command no longer exists, a normal (and time consuming) path search is performed.

Output
Options: (checkbox)off (no hash table check)on (check hash table first)
bash 1.14.4n/an/a
bash 2.0shopt -u checkhashshopt -s checkhash

Return to table of contentstable of contents

How many CTRL-d equals a logout or exit command?

You can specify how many consecutive CTRL-d equals an "exit" or "logout" command.

Output
Options: (integer entry)(*) X == 10X != 10
bash 1.4.14set -o ignoreeofexport IGNOREEOF=X
bash 2.0set -o ignoreeofexport IGNOREEOF=X
(*) is defaultX is the number of CTRL-d keystrokes to equivalence an "exit" command.

Return to table of contentstable of contents

Idle for X seconds before auto-logout (0 = disabled)

This option is intended for use with dial-up lines, but can also be used for other purposes (e.g. if you forget to logout).

Output
Options: (integer entry)(*) X == 0X > 0
bash 1.14.4unset TMOUTexport TMOUT=X
bash 2.0unset TMOUTexport TMOUT=X
(*) is default

Return to table of contentstable of contents

Location of favourite (default) editor

State the location of the default editor.

Output
Options: (filedirbrowser)X != ""
Bash 1.14.4export EDITOR=X
Bash 2.0export EDITOR=X

Return to table of contentstable of contents

Completion

This page will help you setup options concerning completion and globbing. You can complete a commandline typing TAB. Bash will complete the line based on the text before point. Bash attempts completion treating the text as a variable (if the text begins with $), username (if the text begins with ~), hostname (if the text begins with @), or command (including aliases and functions) in turn. If none of these produces a match, filename completion is attempted.

Return to table of contentstable of contents

If words have more than one possible completion...

You can select how Bash should inform you of ambiguity. You have two options, either ring the bell or list all completions.

Output
Options: (radio)(*) ring the belllist all completions
Bash 1.14.4set show-all-if-ambigous offset show-all-if-ambigous on
Bash 2.0set show-all-if-ambigous offset show-all-if-ambigous on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Max. number of elements to show without asking

This determines when the user is queried about viewing the number of possible completions. It may be set to any integer value greater than or equal to zero. If the number of possible completions is greater than or equal to the value of theis variable, the user is asked whether or not he wishes to view them; otherwise they are simply listed on the terminal.

Output
Options: (integer entry)X != 100
Bash 1.14.4set completions-query-items X
Bash 2.0set completion-query-items X
(100 is default)(written to inputrc)

Return to table of contentstable of contents

Expand tilde (~) when completing

Tilde (~) is a shortcut for the path to your home directory. If set, tilde expansion (to the path) is performed when readline attempts word completion.

Output
Options: (checkbox)(*) offon
Bash 1.14.4set expand-tilde offset expand-tilde on
Bash 2.0set expand-tilde offset expand-tilde on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Hostname file

File in the same format as /etc/hosts that should be read when the shell needs to complete a hostname. The file may be changed interactively; the next time hostname completion is attempted Bash adds the contents of the new file to the already existing database.

Output
Options: (entry)X != "/etc/hosts"X == ""
Bash 1.14.4export HOSTFILE=Xunset HOSTFILE
Bash 2.0export HOSTFILE=Xunset HOSTFILE
("/etc/hosts" is default)

Return to table of contentstable of contents

File suffixes to ignore upon filename completion

A colon-seperated list of suffixes to ignore when performing filename completion. A filename whose suffix matches one of the entries is excluded from the list of matched filenames.

Output
Options: (extentry)
Bash 1.14.4export FIGNORE=X
Bash 2.0export FIGNORE=X
(X is a colon seperated list)

Return to table of contentstable of contents

Expand wildcards (* and ? in filenames)

Before a command/program is executed, Bash will skim the commandline for wildcards. If found, Bash will glob filenames, where file names will fit the wildcard pattern. You can disable this feature, however it is not likely you have to do that.

Output
Options: (checkbox)off (no glob)(*) on (glob)
Bash 1.14.4set -o noglobset +o noglob
Bash 2.0set -o noglobset +o noglob
(*) is default

Return to table of contentstable of contents

Allow null-string expansion

If set, Bash allows pathname patterns which match no files to expand to a null string, rather than themselves.

Output
Options: (checkbox)(*) offon
Bash 1.14.4unset allow_null_glob_expansionexport allow_null_glob_expansion=on
Bash 2.0shopt -u nullglobshop -s nullglob
(*) is default

Return to table of contentstable of contents

Include dot-files upon filename globbing

If set, Bash includes filenames beginning with a '.' (dot) in the results of pathname expansion.

Output
Options: (checkbox)(*) offon
Bash 1.14.4unset glob_dot_filenamesexport glob_dot_filenames=on
Bash 2.0shopt -u dotglobshopt -s dotglob
(*) is default

Return to table of contentstable of contents

Job control

Job control refers to the ability to selectively stop (suspend) the execution of processes and continue (resume) their execution at a later point. A user typically employs this facility via an interactive interface supplied jointly by the system's terminal driver and Bash. If the operating system on which Bash is running supports job control, Bash allows you to use it. Typing the suspend character (typically ^Z, CTRL-z) while a process is running causes that process to be stopped and returns you to Bash. You may then manupulate the state of this job, using the bg command to continue it in the background, the fg command to continue it in the foreground, or the kill command to kill it. A ^Z takes effect immediately, and has the additional side effect of causing pending output and typeahead to be discarded.

Return to table of contentstable of contents

Allow job control

This is enable for interactive shells by default (if system allows), and will run background processes in a seperate process group and a line containing their exit status is printed upon their completion.

Output
Options: (checkbox)off(*) on
Bash 1.14.4set +o monitorset -o monitor
Bash 2.0set +o monitorset -o monitor
(*) is default

Return to table of contentstable of contents

Fast resume of suspended jobs (auto-resume)

This option controls how the shell interacts with the user and job control. If this option is set, single word simple commands without redirections are treated as candidates for resumption of an existing stopped job. There is no ambiguity allowed; if there is more than one job beginning with the string typed, the job most recently accessed is selected. The name of a stopped job, in this context, is the command line used to start it. If set to the value exact, the string supplied must match the name of a stopped job exactly; if set to substring, the string supplied needs to match a substring of the name of a stopped job. The substring value provides functionality analogous to the %? job id (see BASH(1) manual, about JOB CONTROL). If set to any other value (in this module the value prefix), the suplied string must be a prefix of a stopped job's name; this provides funtionality analogous to the % job id.

Output
Options: (menu)(*) disabledsubstringprefixexact
Bash 1.14.4unset a_rexport a_r=substringexport a_r=prefixexport a_r=exact
Bash 2.0unset a_rexport a_r=substringexport a_r=prefixexport a_r=exact
(*) is default
(a_r=auto_resume)
(prefix is considered as an arbitrary value)

Return to table of contentstable of contents

When is Bash to notify of terminating background jobs?

You have two options, either report before next prompt, or immediately no matter what you currently are doing/writing.

Output
Options: (radio)(*) before primary promptnotify immediately
Bash 1.14.4set +bset -b
Bash 2.0set +bset -b
(*) is default

Return to table of contentstable of contents

Keyboard bindings

Here you can setup keyboard macros. A macro is simply a sequeence of keystrokes or a builtin (readline) command. Typing the key sequence causes the keys in the macro to be entered as though you had typed them. Some of the readline commands and their bindings you can see in Keymap for commandline editor.

Return to table of contentstable of contents

Key combination

What key sequence do you want to bind to a macro. Remember, when using key alternation (control, meta or esc), do only prefix one. The other keys (tabulator and function keys) may not accept alternation.

Return to table of contentstable of contents

Builtin commands

This is a list of builtin readline commands. Some of them are already bound by default (see Keymap for commandline editor).

Return to table of contentstable of contents

User defined text/commands

Here you can make your own command/macro. Tip: if your macro is to be evaluated by Bash, add a "Return/Enter key" at the end.

Return to table of contentstable of contents

Mail check

You can make Bash check for incoming mail, if you should choose to. The shell can't actually check for incoming mail, but it check your mail file periodically and dertermine whether the file has been modified since last check. Here you can setup how often, what file(s) to check.

Return to table of contentstable of contents

Check for mail every X seconds

Specifies how often (in seconds) Bash checks for mail. When it is time to check for mail, the shell does so before prompting.

Output
Options: (integer entry)X != 60X == 0
Bash 1.14.4export MAILCHECK=Xunset MAILCHECK
Bash 2.0export MAILCHECK=Xunset MAILCHECK
(60 sec. is default)(Disable mailcheck)

Return to table of contentstable of contents

Notify if mailfile has been read since last check

If a mailfile that Bash is checking for mail has been accessed since the last time it was checked, the message "The mail in mailfile has been read" is printed.

Output
Options: (checkbox)(*) offon
Bash 1.14.4unset MAIL_WARNINGexport MAIL_WARNING=on
Bash 2.0unset MAIL_WARNINGexport MAIL_WARNING=on
(*) is default

Return to table of contentstable of contents

File(s) to check for incoming mail

Here you can specify one or more files to check for mail. Also you may add a message with each mailfile, useful if you e.g. split up you incoming mail with procmail.

Output
Options: (extentry)
Bash 1.14.4export MAILPATH=X
Bash 2.0export MAILPATH=X
(X is a colon seperated list of /path/file or /path/file?message)

Return to table of contentstable of contents

TTY appearance

This configuration page covers topics as screen dimensions, bell style, how to react on commandline exceeding screen width, etc.

Return to table of contentstable of contents

Screen width

This value is used by screen-oriented editor like vi. In most cases a default is used if they are undefined, but if you are having display problems with screen-oriented applications then you should check this setting to see if it is correct.

Output
Options: (integer entry)X != 80
Bash 1.14.4export COLUMNS=X
Bash 2.0export COLUMNS=X
(80 is default)

Return to table of contentstable of contents

Screen height

This value is used by screen-oriented editor like vi. In most cases a default is used if they are undefined, but if you are having display problems with screen-oriented applications then you should check this setting to see if it is correct.

Output
Options: (integer entry)X != 24
Bash 1.14.4export LINES=X
Bash 2.0export LINES=X
(24 is default)

Return to table of contentstable of contents

Automatic update of screen width/height

If set, bash checks the window size after each command and, if necessary, updates the values of LINES and COLUMNS.

Output
Options: (checkbox)(*) offon
Bash 1.14.4n/an/a
Bash 2.0shopt -u checkwinsizeshopt -s checkwinsize
(*) is default

Return to table of contentstable of contents

If commandline exceeds screen width...

If set, lines will scroll horizontally if you type beyond the right-hand side of the screen, else lines will wrap onto a new screen line.

Output
Options: (radio)(*) wrap onto new linescroll horizontally
Bash 1.14.4set horizontal-scroll-mode offset horizontal-scroll-mode on
Bash 2.0set horizontal-scroll-mode offset horizontal-scroll-mode on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Bell type

If set to none then Readline (the commandline editor) never rings the bell (beeps). If set to visible, Readline will attempt to use a visible bell. If set to audible then it will attempt to ring the bell, which is default.

Output
Options: (radio)none (disabled)(*) audiblevisible
Bash 1.14.4set bell-style noneset bell-style audibleset bell-style visible
Bash 2.0set bell-style noneset bell-style audibleset bell-style visible
(*) is default(written to inputrc)(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Allow 8-bit characters in commandline

If set, eight-bit input will be accepted. (When set, I've had problems with meta alternated keystrokes, as meta-TAB?)

Output
Options: (checkbox)(*) offon
Bash 1.14.4set meta-flag offset meta-flag on
Bash 2.0set meta-flag offset meta-flag on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Convert 8-bit characters to ESC sequences

If set, Readline (the commandline editor) will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prepending an ESC character.

Output
Options: (checkbox)off(*) on
Bash 1.14.4set convert-meta offset convert-meta on
Bash 2.0set convert-meta offset convert-meta on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

Display 8-bit characters

If set, Bash will display characters with the eighth bit set directly.

Output
Options: (checkbox)(*) offon
Bash 1.14.4set output-meta offset output-meta on
Bash 2.0set output-meta offset output-meta on
(*) is default(written to inputrc)(written to inputrc)

Return to table of contentstable of contents

System/Bash interface

Here you can configure options that have no affect on interactive communication with user--not directly anyway. In this group options on file creation, path search, etc. is found. Please remember, options in this section is to be altered with much care, as much of this information is essential for the shell to work properly.

Return to table of contentstable of contents

Error handling

This configuration page will help you to setup options concerning certain exceptions.

Return to table of contentstable of contents

Treat undefined variables as errors

Treat unset variables as an error when performing parameter expansion. If expansion is attempted on an unset variable, the shell prints an error message, and, if not interactive, exits with a non-zero status.

Output
Options: (checkbox)(*) offon
Bash 1.14.4set +o nounsetset -o nounset
Bash 2.0set +o nounsetset -o nounset
(*) is default

Return to table of contentstable of contents

Non-interactive shell exit if 'exec'-call fails

If this option is unchecked, a non-interactive shell will not exit if it cannot execute the file specified in the exec builtin command. An interactive shell does not exit if exec fails.

Output
Options: (checkbox)(*) onoff
Bash 1.14.4unset no_exit_on_failed_execexport no_exit_on_failed_exec=on
Bash 2.0shopt -u execfailshopt -s execfail
(*) is default

Return to table of contentstable of contents

Exit shell if 'simple' command fails

Exit immediately if a simple-command (see BASH(1) manual, about notify under Shell Variables) exits with a non-zero status. The shell does not exit if the command that fails is part of an until or while loop, part of an if statement, part of a && or || list, or if the command's return value is being inverted via !.

Output
Options: (checkbox)(*) offon
Bash 1.14.4set +o errexitset -o errexit
Bash 2.0set +o errexitset -o errexit
(*) is default

Return to table of contentstable of contents

Halt if 'shift'-ing exceeds number of arguments

The builtin shift prints an error message when the shift count exceeds the number of positional parameters. Shift is used to alter argument variables $X. For instance, "convert -f abc.txt def.html", where convert is a shell script, will bind variables as follows; $1=-f, $2=abc.txt and $3=def.html. The flag "-f" if optional, and often one would just test on the presence of a flag, do something, and continue evaluation. Shift lets you eliminate the flag, by shifting down the arguments, so variable bindings now are; $1=abc.txt and $2=def.html. If not specified, only one "shift" is performed. In versions prior to Bash 2.0, there is no test if shift exceedes the number of arguments.

Output
Options: (checkbox)offon
Bash 1.14.4n/an/a
Bash 2.0shopt -u shift_verboseshopt -s shift_verbose

Return to table of contentstable of contents

File and directory handling

This configuration page will help you to setup options concerning file and directory handling, how to follow links, etc.

Return to table of contentstable of contents

Allow redirected output overwriting existing files

If set, Bash does not overwrite an existing file with the >, >&, and <> redirection operators. This option may be overridden when creating output files by using the redirection operator >! instead of >.

Output
Options: (checkbox)offon
Bash 1.14.4set +o noclobberset -o noclobber
Bash 2.0set +o noclobberset -o noclobber

Return to table of contentstable of contents

File/dir creation mask

Specify with what permissions you create files/directories.

Default configuration
ReadWriteExecute
UserRead/Read(over-)Write/Create filesExecute/"cd" to
GroupRead/Readnot allowed/not allowedExecute/"cd" to
OtherRead/Readnot allowed/not allowedExecute/"cd" to
(file/dir)(file/dir)(file/dir)

Return to table of contentstable of contents

How is Bash to follow directory links?

If set, do not follow symbolic links when performing commands such as cd which change the current directory. The physical directory is used instead.

Output
Options: (radio)(*) logicallyphysically
Bash 1.14.4set +o physicalset -o physical
Bash 2.0set +o physicalset -o physical
(*) is default

Return to table of contentstable of contents

"cd" allows variables as argument

If set, an argument to the cd builtin command that is not a directory is assumed to be the name of a varaible whose value is the directory to change to.

Output
Options: (checkbox)(*) offon
Bash 1.14.4unset cdable_varsexport cdable_vars=on
Bash 2.0shopt -u cdable_varsshopt -s cdable_vars
(*) is default

Return to table of contentstable of contents

"cd" guess directory name if misspelled

If set, minor errors in the spelling of a directory component in a cd command will be corrected. The errors checked for are transposed characters, a missing character, and one character too many. If a correction is found, the corrected file name is printed, and the command proceeds. This option is enabled by default, but is only used by interactive shells.

Output
Options: (checkbox)off(*) on
Bash 1.14.4n/an/a
Bash 2.0shopt -u cdspellshopt -s cdspell
(*) is default

Return to table of contentstable of contents

Paths

This configuration page will help you to setup paths. If a path is already defined, the Bash module will attempt to read it and auto-fillout the entries. You can then add, or delete in the list as you please, just bear in mind not to compromise with system security.

Return to table of contentstable of contents

Command path

The search path for commands. It is a list of directories in which the shell looks for commands. The default path is system-dependent, and is set by the administrator who installs Bash. A common path is: "/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:.".

Output
Options: (extentry)
Bash 1.14.4PATH=X; export PATH
Bash 2.0PATH=X; export PATH
(X is a colon seperated list)

Return to table of contentstable of contents

"cd" path

The search path for the cd command. This is a list of directories in which the shell looks for destination directories specified by the cd command.

Output
Options: (extentry)
Bash 1.14.4CDPATH=X; export CDPATH
Bash 2.0CDPATH=X; export CDPATH
(X is a colon seperated list)

Return to table of contentstable of contents

Manual path

The search path for the man command. This is a list of directories in which the man program looks for manual pages. A common path is: "/usr/man:/usr/X11/man".

Output
Options: (extentry)
Bash 1.14.4MANPATH=X; export MANPATH
Bash 2.0MANPATH=X; export MANPATH
(X is a colon seperated list)

Return to table of contentstable of contents

System limits

This configuration page will help you to setup how system resources are shared, e.g. how much disk space a user file may allocate, how much memory and CPU-time a user process can allocate, etc.

Return to table of contentstable of contents

Data/Stack segment

Data/Stack segments have to do with dynamic memory allocations, i.e. memory, which a process allocate at runtime. Usually you will not have to limit a proces's data/stack segment.

Output
Options: (entry)Data segmentStack segment
Bash 1.14.4ulimit -d Xulimit -s X
Bash 2.0ulimit -d Xulimit -s X
(X is either a value or "unlimited")

Return to table of contentstable of contents

Main/Virtual memory

Main/Virtual memory options are similar to the two above. This option limits all uses of memory. You normally will not have to put a limit on this unless your system suffers severe memory constraints or you want to avoid thrashing.

Output
Options: (entry)Main memoryVirtual memory
Bash 1.14.4ulimit -m Xulimit -v X
Bash 2.0ulimit -m Xulimit -v X
(X is either a value or "unlimited")

Return to table of contentstable of contents

File size

Put a limit on how much diskspace a file can allocate (often huge files are the work of buggy programs). This is useful if you have constraints on disk space.

Output
Options: (entry)
Bash 1.14.4ulimit -f X
Bash 2.0ulimit -f X
(X is either a value or "unlimited")

Return to table of contentstable of contents

Core-dump size

If a program halts abruptly--either by user or due to a program bug, the system makes a core-dump (memory dump). These files are often quite large and, unless you intend to debug the failing program, of no interest.

Output
Options: (entry)
Bash 1.14.4ulimit -c X
Bash 2.0ulimit -c X
(X is either a value or "unlimited")

File descriptors

Put a limit on how many files to have open at the same time per process. Usually you will not have to limit this number. Do not set the number too low, many programs and commands opens several files at the same time (e.g. performing a "ls" require at least five file descriptors). Some older versions of UNIX will not let you alter this number--they have a fixed limit of 20 file descriptors per process.

Output
Options: (entry)
Bash 1.14.4ulimit -n X
Bash 2.0ulimit -n X
(X is either a value or "unlimited")

Return to table of contentstable of contents

Pipe size

Set the size for a pipe between two commands/programs. A pipe (|) is to be considered as a fifo (first-in-first-out) queue, where information from sender (command/program) is stored until receiver reads it. You can specify how much memory Bash is to allocate for this buffer, in 512-byte increments.

Output
Options: (entry)
Bash 1.14.4ulimit -p X
Bash 2.0ulimit -p X
(X is either a value or "unlimited")

Return to table of contentstable of contents

CPU time

Limit amount of CPU-time a process can use. This is a possible guard againts infinite loops, although it also limits how long a non-buggy program is allowed to run. You are probably better off, leaving this option unlimited.

Output
Options: (entry)
Bash 1.14.4ulimit -t X
Bash 2.0ulimit -t X
(X is either a value or "unlimited")

Return to table of contentstable of contents

# (number) of procs

Limit number of processes a user can start. Useful if you have system memory constraints.

Output
Options: (entry)
Bash 1.14.4ulimit -u X
Bash 2.0ulimit -u X
(X is either a value or "unlimited")

Return to table of contentstable of contents

Bash version

In contrast to the other configuration pages, this page will not create any output, when generating. Here you can specify which version of Bash you want to generate dot.files for.

Return to table of contentstable of contents