# Bash module

This module will help you configure Bash versions ranging from 1.14.4 to 2.0. The module consists of 17 configuration pages, where you can setup options as shell prompt, command aliases, completion, error handling and much more.
Before generating your configuration options, please make sure you have choosen the right version of Bash (default 1.14.4 to 2.0).

# Configuration pages

Below you will find a list of configuration pages in this module. You can use it to get an overview of the module, and if needed a small description of each page is included. For further information on each configuration option on the individual pages, as well as the the generated output, please read the reference guide.

## User/Bash interface

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

### Prompting

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

### 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.

### 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.

### 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.

### 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.

### 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.

### 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 Bash module reference guide.

### 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.

### TTY appearance

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

## 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.

### Error handling

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

### File and directory handling

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

### 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.

### 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.

### 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.

# How to use the output

This module generate options used by the following two files:

.bashrc
  which is used for configuring Bash, and
.inputrc
  holding Readline options (Readline is the builtin Bash commandline editor).

## How to use .bashrc options

You have to options:

- You may generate directly to your ~/.bashrc file. This is recomented if you do NOT have a ~/.bashrc file allready, and do NOT plan to add additional code to the output (i.e. conditions).
- You may generate to an other file than ~/.bashrc (e.g. ~/.bash-dotfile). this file may then be sourced in your original ~/.bashrc file, with the command source. The source line may look like this: source ~/.bash-dotfile

## How to use .inputrc options

Where .bashrc allows you to link in other configuration files, .inputrc does not allow such linking. Therefore you have the following options:

- You may generate directly to your ~/.inputrc file. This is recomented if you do NOT have a ~/.inputrc file allready, and do NOT plan to add additional code to the output.
- You may copy from the file generated by the Dotfile Generator (~/.inputrc-dotfile) to your /~.inputrc. When using simple cut-and-paste, please remember to add your auto- generated information at the bottom--in this way other old configurations are overwritten by your new choice.

Good luck!
Second edition, 1997 January 27
Per Zacho