chiark / gitweb /
finalise changelog
[bash.git] / debian / README
1 Bash Configuration for Debian
2 -----------------------------
3
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.
6
7 The bash package was built using the following configuration options:
8
9         --with-curses \
10         --enable-largefile \
11
12 bash-static additionally configured with --enable-static-link.
13
14 The upstream ChangeLog can be found in the bash-doc package.
15
16
17 A kind of FAQ for bash on Debian GNU/{Linux,Hurd}
18 -------------------------------------------------
19
20 0. symlinked directory completion behavior
21
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:
25
26        set mark-symlinked-directories on
27
28 1. How can I make bash 8-bit clean so I can type hi-bit characters
29    directly?
30
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.
33
34 3. How to get rid off annoying beeps for ambiguous completions?
35
36    Put in /etc/inputrc (or in your ~/.inputrc):
37
38         set show-all-if-ambiguous on
39
40    Other people prefer:
41
42         set bell-style none
43
44 4. bash doesn't display prompts correctly.
45
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.
49
50 5. What is /etc/bash.bashrc? It doesn't seem to be documented.
51
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
56    ~/.bash_profile.
57
58 6. bash does not check $PATH if hash fails
59
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.
63
64    For performance reasons bash does not remove the command from the hash
65    and relook it up in PATH.
66
67    Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'.
68
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: 
71  
72    cd() 
73    { 
74         case $# in 
75         0|1)    ;; 
76         *)      echo "cd: too many arguments ; return 2 ;; 
77         esac 
78         builtin cd "$@" 
79    } 
80
81 8. key bindings for ESC
82
83    Consider the following .inputrc:
84
85    set editing-mode vi
86
87    keymap vi
88        "\M-[D":        backward-char
89        "\M-[C":        forward-char
90        "\M-[A":        previous-history
91        "\M-[B":        next-history
92
93    And, just to be certain, set -o reports that vi is on.
94
95    However, ESC k does not send me to the previous line.
96
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.
100
101    Note that if I remove the meta prefix, leaving lines like:
102        "[A":        previous-history
103
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.
108
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.
114
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)."
118
119
120 Patches Applied to the Bash Sources
121 -----------------------------------
122