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 ----------------------------------- Patches applied in this version: bash32-001: bash-3.2 upstream patch bash32-001 bash32-002: bash-3.2 upstream patch bash32-002 bash32-003: bash-3.2 upstream patch bash32-003 bash32-004: bash-3.2 upstream patch bash32-004 bash32-005: bash-3.2 upstream patch bash32-005 bash32-006: bash-3.2 upstream patch bash32-006 bash32-007: bash-3.2 upstream patch bash32-007 bash32-008: bash-3.2 upstream patch bash32-008 bash32-009: bash-3.2 upstream patch bash32-009 bash32-010: bash-3.2 upstream patch bash32-010 bash32-011: bash-3.2 upstream patch bash32-011 bash32-012: bash-3.2 upstream patch bash32-012 bash32-013: bash-3.2 upstream patch bash32-013 bash32-014: bash-3.2 upstream patch bash32-014 bash32-015: bash-3.2 upstream patch bash32-015 bash32-016: bash-3.2 upstream patch bash32-016 bash32-017: bash-3.2 upstream patch bash32-017 bash32-018: bash-3.2 upstream patch bash32-018 bash32-019: bash-3.2 upstream patch bash32-019 bash32-020: bash-3.2 upstream patch bash32-020 bash32-021: bash-3.2 upstream patch bash32-021 bash32-022: bash-3.2 upstream patch bash32-022 bash32-023: bash-3.2 upstream patch bash32-023 bash32-024: bash-3.2 upstream patch bash32-024 bash32-025: bash-3.2 upstream patch bash32-025 bash32-026: bash-3.2 upstream patch bash32-026 bash32-027: bash-3.2 upstream patch bash32-027 bash32-028: bash-3.2 upstream patch bash32-028 bash32-029: bash-3.2 upstream patch bash32-029 bash32-030: bash-3.2 upstream patch bash32-030 bash32-031: bash-3.2 upstream patch bash32-031 bash32-032: bash-3.2 upstream patch bash32-032 bash32-033: bash-3.2 upstream patch bash32-033 bash32-034: bash-3.2 upstream patch bash32-034 bash32-035: bash-3.2 upstream patch bash32-035 bash32-036: bash-3.2 upstream patch bash32-036 bash32-037: bash-3.2 upstream patch bash32-037 bash32-038: bash-3.2 upstream patch bash32-038 bash32-039: bash-3.2 upstream patch bash32-039 bashbug-editor: send bug reports to Debian bash maintainer too. deb-bash-config: Changed compile time configuration options: - Set the default path to comply with Debian policy - Enable System-wide .bashrc file for interactive shells. - Enable System-wide .bash.logout file for interactive shells. - make non-interactive shells begun with argv[0][0] == '-' run the startup files when not in posix mode. - try to check whether bash is being run by sshd and source the .bashrc if so (like the rshd behavior). - don't define a default DEFAULT_MAIL_DIRECTORY, because it can cause a timeout on NFS mounts. deb-examples: document readline header location on Debian systems man-arithmetic: document deprecated syntax for arithmetic evaluation. man-fignore: bash(1): mention quoting when assigning to FIGNORE man-bashrc: document /etc/bash.bashrc in bash man page man-bashlogout: document /etc/bash.bashrc in bash man page man-substring-exp: Clarify documentation about substring expansion man-nocaseglob: Clarify documentation about case-insensitive pathname expansion man-test: document conditional file expressions acting on the target of symbolic links as well (except -h, -L). man-test2: Doucment handling of paramters of the test builtin. man-net-redirections: Document, that bash is configured using --disable-net-redirections. privmode: XXX missing description Comment from Chet Ramey : Nope. This will allow setuid scripts if not called as `sh' and not called with the -p option. I won't install this. rbash-manpage: doc/rbash.1: fix bash(1) reference command-not-found: Add command_not_found_handle in interactive non POSIX mode bash-default-editor: Use `command -v editor`, as an editor, if available. po-sv: swedish message strings bash-subst-param-length: pgrp-pipe: Define PGRP_PIPE to avoid race condition. input-err: Define PGRP_PIPE to avoid race condition. exec-redirections-man: bash-aliases-repeat: Fix bug in Bash_aliases example. builtins-caller: Fix typo in help message for caller builtin man-bold-comma: markup fix