diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-12 13:13:20 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-11-14 16:16:47 -0800 |
commit | fc7695ee76400ee9833301f98a3fe483d64591b5 (patch) | |
tree | 15b568f5adfa956817cf9f5a1652c43d33d8efa9 /debian/README | |
parent | b7fc9e0f6d6105ba2203f219743d4b269415e84b (diff) | |
download | vyatta-bash-fc7695ee76400ee9833301f98a3fe483d64591b5.tar.gz vyatta-bash-fc7695ee76400ee9833301f98a3fe483d64591b5.zip |
initial import from bash_3.1dfsg-8.diff.gzupstream
Diffstat (limited to 'debian/README')
-rw-r--r-- | debian/README | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..9849f94 --- /dev/null +++ b/debian/README @@ -0,0 +1,140 @@ +Bash Configuration for Debian +----------------------------- + +A number of patches for the bash sources is applied for the Debian build +of bash. See the details at the end of the file. + +The bash package was built using the following configuration options: + + --with-curses \ + --disable-net-redirections \ + --enable-largefile \ + +bash-static additionally configured with --enable-static-link, bash-minimal +configured with --enable-minimal-config --enable-largefile. + + +A kind of FAQ for bash on Debian GNU/{Linux,Hurd} +------------------------------------------------- + +0. symlinked directory completion behavior + + Starting with readline-4.2a, completion on symlinks that point + to directories does not append the slash. To restore the behaviour + found in readline-4.2, add to /etc/inputrc or ~/.inputrc: + + set mark-symlinked-directories on + +1. How can I make /bin/sh point to something else? + + Type + + dpkg-divert --add /bin/sh + + and then point it to whatever you want. Upgrades to bash won't upgrade + the /bin/sh symlink. To put /bin/sh under dpkg control again, type + + dpkg-divert --remove /bin/sh + + +2. How can I make bash 8-bit clean so I can type hi-bit characters + directly? + + Remove the comments from the indicated lines in /etc/inputrc. + It doesn't ship this way because otherwise the Meta bindings will not work. + +3. How to get rid off annoying beeps for ambiguous completions? + + Put in /etc/inputrc (or in your ~/.inputrc): + + set show-all-if-ambiguous on + + Other people prefer: + + set bell-style none + +4. bash doesn't display prompts correctly. + + When using colors in prompts (or escape characters), then make sure + those characters are surrounded by \[ and \]. For more information + look at the man page bash(1) and search for PROMPTING. + +5. What is /etc/bash.bashrc? It doesn't seem to be documented. + + The Debian version of bash is compiled with a special option + (-DSYS_BASHRC) that makes bash read /etc/bash.bashrc before ~/.bashrc + for interactive non-login shells. So, on Debian systems, + /etc/bash.bashrc is to ~/.bashrc as /etc/profile is to + ~/.bash_profile. + +6. bash does not check $PATH if hash fails + + bash hashes the location of recently executed commands. When a command + is moved to a new location in the PATH, the command is still in the PATH + but the hash table still records the old location. + + For performance reasons bash does not remove the command from the hash + and relook it up in PATH. + + Use 'hash -r' manually or set a bash option: 'shopt -s checkhash'. + +7. Bourne-style shells have always accepted multiple directory name arguments + to cd. If the user doesn't like it, have him define a shell function: + + cd() + { + case $# in + 0|1) ;; + *) echo "cd: too many arguments ; return 2 ;; + esac + builtin cd "$@" + } + +8. key bindings for ESC + + Consider the following .inputrc: + + set editing-mode vi + + keymap vi + "\M-[D": backward-char + "\M-[C": forward-char + "\M-[A": previous-history + "\M-[B": next-history + + And, just to be certain, set -o reports that vi is on. + + However, ESC k does not send me to the previous line. + + I'm guessing that this is a conflict between bash's concept of a meta + keymap and its concept of vi's command-mode character -- which is to + say that its data structures don't properly reflect its implementation. + + Note that if I remove the meta prefix, leaving lines like: + "[A": previous-history + + That vi command mode keys work fine, and I can use the arrow keys in vi + mode, *provided I'm already in command mode already*. In other words, + bash is doing something wrong here such that it doesn't see the escape + character at the begining of the key sequence even when in vi insert mode. + + Comment from the upstream author: "This guy destroyed the key binding for + ESC, which effectively disabled vi command mode. It's not as simple as he + paints it to be -- the binding for ESC in the vi insertion keymap *must* + be a function because of the other things needed when switching + from insert mode to command mode. + + If he wants to change something in vi's command mode, he needs + to use `set keymap vi-command' and enter key bindings without + the \M- prefix (as he discovered)." + +9. Why is bash configured with --disable-net-redirections? + + It can produce completely unexpected results. This kind of + feature should not be part of a shell but a special. tool. And + that tool has existed for years already, it's called netcat. + + +Patches Applied to the Bash Sources +----------------------------------- + |