diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:17:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:17:26 +0000 |
commit | 3abb3f4db4372683dde9d2565d27d807ffdd5ac4 (patch) | |
tree | 83da6f31e160b887fcf21342ac42b2ea21a457c0 /debian/README | |
parent | Adding upstream version 5.1. (diff) | |
download | bash-debian.tar.xz bash-debian.zip |
Adding debian version 5.1-2+deb11u1.debian/5.1-2+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/README | 122 | ||||
-rw-r--r-- | debian/README.abs-guide | 26 | ||||
-rw-r--r-- | debian/README.bash_completion | 18 | ||||
-rw-r--r-- | debian/README.commands | 189 |
4 files changed, 355 insertions, 0 deletions
diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..bb5e878 --- /dev/null +++ b/debian/README @@ -0,0 +1,122 @@ +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 \ + --enable-largefile \ + +bash-static additionally configured with --enable-static-link. + +The upstream ChangeLog can be found in the bash-doc package. + + +A kind of FAQ for bash on Debian GNU/{Linux,Hurd} +------------------------------------------------- + +1. 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 + +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 beginning 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)." + + +Patches Applied to the Bash Sources +----------------------------------- + diff --git a/debian/README.abs-guide b/debian/README.abs-guide new file mode 100644 index 0000000..7a69558 --- /dev/null +++ b/debian/README.abs-guide @@ -0,0 +1,26 @@ +[ This is just a pointer to a document, which you might find helpful] + + Advanced Bash-Scripting Guide + + A complete guide to shell scripting, using Bash + + Mendel Cooper - Brindlesoft + + thegrendel@theriver.com + + +This tutorial assumes no previous knowledge of scripting or programming, but +progresses rapidly toward an intermediate/advanced level of instruction +(...all the while sneaking in little snippets of UNIX wisdom and lore). It +serves as a textbook, a manual for self-study, and a reference and source +of knowledge on shell scripting techniques. The exercises and heavily- +commented examples invite active reader participation, under the premise that +the only way to really learn scripting is to write scripts. + +The guide is availabe at http://tldp.org/LDP/abs/html/ + +The latest update of this document, as an archived "tarball" including both +the SGML source and rendered HTML, may be downloaded from the author's home +site (http://personal.riverusers.com/~thegrendel/abs-guide-2.1.tar.bz2). See +the change log for a revision history +(http://personal.riverusers.com/~thegrendel/Change.log). diff --git a/debian/README.bash_completion b/debian/README.bash_completion new file mode 100644 index 0000000..7be4235 --- /dev/null +++ b/debian/README.bash_completion @@ -0,0 +1,18 @@ + Programmable Completion + ======================= + +[BUG REPORTING: Please direct all enhancement requests directly to the + bash_completion maintainer, the completion script won't be changed for + Debian specific enhancements. If you find a real bug, report it the usual + way. The bash_completion author can be reached at + http://freshmeat.net/projects/bashcompletion/ + + If you find a newer version on freshmeat, you can replace it, if you did + not change the Debian version. +] + +To enable programmable completion for bash on Debian, uncomment the +bash_completion lines in /etc/bash.bashrc to source +/usr/share/bash-completion/bash_completion. +/usr/share/bash-completion/bash_completion sources ~/.bash_completion, if +it exists. diff --git a/debian/README.commands b/debian/README.commands new file mode 100644 index 0000000..8e2aaf6 --- /dev/null +++ b/debian/README.commands @@ -0,0 +1,189 @@ + This is a jumping-off reference point for new users who may be + completely unfamiliar with Linux commands. It does not contain all + the information you need about using the Linux console, but instead + just gives you enough information to get started finding the + information you need. + +Linux Commands + + To run a command, type the command at the prompt, followed by any + necessary options, and then press the Enter or Return key. + + Most commands operate silently unless they are specifically asked to + say what they are doing. If there is no error message, the command + should have worked. + + The operation of most commands can be changed by putting command + options immediately after the command name. There are several styles + of options used, and you have to check the documentation for each + command to know what options it can take, and what they do. + + Linux commands are case-sensitive, and almost always are all + lower-case. ls is a valid command; LS is not. + + In most cases you can use the tab key to ask the command shell to + auto-complete the command, directory or filename you have started + to type. If a unique completion exists, the shell will type it. If + not, you can press tab a second time to obtain a list of the + possible auto-completions. + +Commands for Reading Documentation + + In the following command examples, the [ ] characters are not + typed, they mean that whatever is enclosed is optional. For + example, you can also start `info' without any subject at all. + + When a given keyboard shortcut is preceded by ctrl- or alt- , that + means hold the control or alt key down, and type the given key + while holding it down (the same way you use the shift key). A + shorthand notation for ctrl- is ^ (^C means ctrl-C). + + man subject + man shows the manual page on the command (use q or ctrl-C to + get out of it if it doesn't terminate at the end of the + text). + + info [subject] + A lot of Debian Linux documentation is provided in info + format. This is similar to a hypertext format, in that you + can jump to other sections of the documentation by following + links embedded in the text. An info tutorial is available + within info, using ctrl-h followed by h. + + help [subject] + Use help for on-line help about the shell's built-in commands. + help by itself prints a list of subjects for which you can + ask for help. + + pager filename + pager displays a plain text file one screen at a time. + Additional screens can be displayed by pressing the space + bar, and previous screens can be displayed by pressing the b + key. When finished viewing the help, press q to return to + the prompt. + + Using -h --help with | pager + Most commands offer very brief built-in help by typing the + command followed by + + -h or --help + + If the help scrolls up beyond the top of the screen before + you can read it, add + + | pager + + to the end of the command. + + zmore document.gz + zmore is a document pager -- it displays the contents of + compressed documentation on your disk, one screenful at a + time. Compression is signified by filenames ending in .gz . + + lynx [document] or lynx [directory] or lynx [url] + lynx is a text-based web browser. It can display documents + (plain-text, compressed, or html), directory listings, and + urls such as www.google.com. It does not display images. + +Commands for Navigating Directories + + pwd + Displays your current working directory. The p stands for + print, which is a carryover from when unix was designed, + before the advent of computer screens. Interactive computer + responses were printed on paper by a connected electric + typewriter instead of being displayed electronically. + + cd [directory] + Change your current directory to the named directory. If you + don't specify directory, you will be returned to your home + directory. The `root' directory is signified by / at the + beginning of the directory path ( / also separates directory + and file names within the path). Thus paths beginning with / + are `absolute' paths; cd will take you to an absolute path + no matter what your current directory is. Paths not + beginning with / specify paths relative to your + current directory. cd .. means change to the parent + directory of your current working directory. + + ls [directory] + ls lists the contents of directory. If you don't specify a + directory name, the current working directory's list is + displayed. + + find directory -name filename + find tells you where filename is in the tree starting at + directory. This command has many other useful options. + +Documentation Indices + + The standard doc-linux-text package installs compressed text linux + HOWTOs in + + /usr/share/doc/HOWTO/en-txt/ + + Particularly helpful HOWTOs for new users are + + /usr/share/doc/HOWTO/en-txt/Unix-and-Internet-Fundamentals-HOWTO.gz + /usr/share/doc/HOWTO/en-txt/mini/INDEX.gz + /usr/share/doc/HOWTO/en-txt/Reading-List-HOWTO.gz + /usr/share/doc/HOWTO/en-txt/META-FAQ.gz + + Individual package documentation is installed in + + /usr/share/doc/<package-name> + + New user website references include + + http://www.debian.org/doc/FAQ + http://www.linuxdoc.org/LDP/gs/gs.html + +Recording User Sessions + + script filename + Use script to record everything that appears on the screen + (until the next exit) in filename. This is useful if you + need to record what's going on in order to include it in + your message when you ask for help. Use exit, logout or + ctrl-D to stop the recording session. + +Turning Echo On/Off + + To turn off echoing of characters to the screen, you can use + ctrl-S. ctrl-Q starts the echo again. If your terminal suddenly + seems to become unresponsive, try ctrl-Q; you may have accidentally + typed ctrl-S which activated echo-off. + +Virtual Consoles + + By default, six virtual consoles are provided. If you want to + execute another command without interrupting the operation of a + command you previously started, you can switch to another virtual + console (similar to a separate window). This is very handy for + displaying the documentation for a command in one console while + actually trying the command in another. Switch consoles 1 through 6 + by using alt-F1 through alt-F6. + +Logging Out + + exit or logout + + Use exit or logout to terminate your session and log + out. You should be returned to the log-in prompt. + +Turning Off the Computer + + Turning the computer on and off is really a system administration + subject, but I include it here because it is something that every + user who is his own administrator needs to know. + + halt or shutdown -t 0 -h now + This command shuts the computer down safely. You can also + use ctrl-alt-del if your system is set up for that. (If you + are in X, ctrl-alt-del will be intercepted by X. Get out of + X first by using ctrl-alt-backspace.) + + +To display this file one screen at a time, type + +pager /usr/share/doc/doc-linux-text/README.commands |