1 Bash Configuration for Debian
2 -----------------------------
4 A number of patches for the bash sources is applied for the Debian build
5 of bash. See the details at the end of the file.
7 The bash package was built using the following configuration options:
12 bash-static additionally configured with --enable-static-link.
14 The upstream ChangeLog can be found in the bash-doc package.
17 A kind of FAQ for bash on Debian GNU/{Linux,Hurd}
18 -------------------------------------------------
20 0. symlinked directory completion behavior
22 Starting with readline-4.2a, completion on symlinks that point
23 to directories does not append the slash. To restore the behaviour
24 found in readline-4.2, add to /etc/inputrc or ~/.inputrc:
26 set mark-symlinked-directories on
28 1. How can I make bash 8-bit clean so I can type hi-bit characters
31 Remove the comments from the indicated lines in /etc/inputrc.
32 It doesn't ship this way because otherwise the Meta bindings will not work.
34 3. How to get rid off annoying beeps for ambiguous completions?
36 Put in /etc/inputrc (or in your ~/.inputrc):
38 set show-all-if-ambiguous on
44 4. bash doesn't display prompts correctly.
46 When using colors in prompts (or escape characters), then make sure
47 those characters are surrounded by \[ and \]. For more information
48 look at the man page bash(1) and search for PROMPTING.
50 5. What is /etc/bash.bashrc? It doesn't seem to be documented.
52 The Debian version of bash is compiled with a special option
53 (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc
54 for interactive non-login shells. So, on Debian systems,
55 /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to
58 6. bash does not check $PATH if hash fails
60 bash hashes the location of recently executed commands. When a command
61 is moved to a new location in the PATH, the command is still in the PATH
62 but the hash table still records the old location.
64 For performance reasons bash does not remove the command from the hash
65 and relook it up in PATH.
67 Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'.
69 7. Bourne-style shells have always accepted multiple directory name arguments
70 to cd. If the user doesn't like it, have him define a shell function:
76 *) echo "cd: too many arguments ; return 2 ;;
81 8. key bindings for ESC
83 Consider the following .inputrc:
88 "\M-[D": backward-char
90 "\M-[A": previous-history
93 And, just to be certain, set -o reports that vi is on.
95 However, ESC k does not send me to the previous line.
97 I'm guessing that this is a conflict between bash's concept of a meta
98 keymap and its concept of vi's command-mode character -- which is to
99 say that its data structures don't properly reflect its implementation.
101 Note that if I remove the meta prefix, leaving lines like:
102 "[A": previous-history
104 That vi command mode keys work fine, and I can use the arrow keys in vi
105 mode, *provided I'm already in command mode already*. In other words,
106 bash is doing something wrong here such that it doesn't see the escape
107 character at the beginning of the key sequence even when in vi insert mode.
109 Comment from the upstream author: "This guy destroyed the key binding for
110 ESC, which effectively disabled vi command mode. It's not as simple as he
111 paints it to be -- the binding for ESC in the vi insertion keymap *must*
112 be a function because of the other things needed when switching
113 from insert mode to command mode.
115 If he wants to change something in vi's command mode, he needs
116 to use `set keymap vi-command' and enter key bindings without
117 the \M- prefix (as he discovered)."
120 Patches Applied to the Bash Sources
121 -----------------------------------