Filename completion adds extra chars to command line
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I/tmp/bash-3.0 -I/tmp/bash-3.0/include -I/tmp/bash-3.0/lib -O2 uname output: CYGWIN_NT-5.0 PN100-01-1-123s 1.5.17(0.129/4/2) 2005-05-25 19:38 i686 unknown unknown Cygwin Machine Type: i686-pc-cygwin Bash Version: 3.0 Patch Level: 16 Release Status: release Description: After hitting TAB twice for a list of possible candidates for filenames, the command line following the list has too many characters on it. It may be that the shell is not properly accounting for escape code in the prompt. This problem does not occur with command name completion. Here is a sample: 123 scripts > ls CVS/- Hit TAB twice Entries Repository Root 123 scripts > ls CVS/ CVS/ Using the backspace key to try to erase the entire command, leaves: 123 scripts > ls CV Another sample: 127 scripts > ls /usr/bin/zip zip.exe zipgrep zipnote.exe zipcloak.exe zipinfo zipsplit.exe 127 scripts > ls /usr/bin/zipn/zip Backspacing to erase the command leaves behind: 127 scripts > ls /u My prompt is defined as: PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]' As an example of command name completion (which doesn't show this problem): 126 scripts > ln - Hit TAB twice ln.exe lnkstub.exe 126 scripts > ln Backspacing to erase the command leave just the prompt (as it should). Repeat-By: Set prompt to: PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]' Test filename completion with: ls /usr/bin/zip Observe extra chars added to command line. Backspace to erase the command line. Observes that extra characters remain after the prompt. Fix: (I have no fix to offer.) ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
Clearing window (^L) messes up command line
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I/tmp/bash-3.0 -I/tmp/bash-3.0/include -I/tmp/bash-3.0/lib -O2 uname output: CYGWIN_NT-5.0 PN100-01-1-123s 1.5.17(0.129/4/2) 2005-05-25 19:38 i686 unknown unknown Cygwin Machine Type: i686-pc-cygwin Bash Version: 3.0 Patch Level: 16 Release Status: release Description: Typing in a command (without hitting ), and then clearing the window with ^L results in extra characters being added to the command line. This may be the result of bash not properly taking into account escape sequences in the prompt. As an example: 250 scripts > ls /bin - not typed yet Now I press ^L, and the window looks like: 250 scripts > ls /bin /bin Trying to erase the entire line using BS, leaves: 250 scripts > ls /b My prompt is set to: PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]' Repeat-By: Set prompt to: PS1='\[\e]2;\w\007\]\[\e[1;31m\]\# \[\e[32m\]\W \[\e[36m\]> \[\e[0m\]' At the shell prompt, type a command without hitting . Now type ^L. Observe extra chars added to the command. Backspace to try to eliminate the entire line. Observe that some chars cannot be erased. Fix: (I have none.) ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash
case modification won't work with pattern
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2 -Wall uname output: Linux Xubuntu 2.6.31-22-generic #73-Ubuntu SMP Fri Feb 11 17:36:01 UTC 2011 i686 GNU/Linux Machine Type: i486-pc-linux-gnu Bash Version: 4.0 Patch Level: 33 Release Status: release Description: The case modification won't work with pattern. I have a simple script a.sh, please see below: #! /bin/bash var="abcabc" echo "var: ${var}" echo "replace the leading \"ab\" to uppercase: ${var^ab}" # expect to get "ABcabc" ? echo "replace all the \"ab\" to uppercase: ${var^^ab}"# expect to get "ABcABc" ? echo "replace the first \"a\" to uppercase: ${var^a}" echo "replace all \"a\" to uppercase: ${var^^a}" Then the result is: mylogin@Xubuntu:~/shell$ ./a.sh var: abcabc replace the leading "ab" to uppercase: abcabc --> incorrect replace all the "ab" to uppercase: abcabc --> incorrect replace the first "a" to uppercase: Abcabc --> correct replace all "a" to uppercase: AbcAbc--> correct Repeat-By: -- Jerry Wang jerry.j.w...@alcatel-lucent.com
In the bash man page the entry for the 'read' command has two spaces after it instead of one.
Hi I ran bashbug on the command line and entered all the information for my bug report but then when I tried to submit it I got the following error: $ jmarbas@jmarbas-System:~/linux/quiz$ bashbug Send bug report to bug-bash@gnu.org,b...@packages.debian.org? [y/n] y /usr/bin/bashbug: 267: /usr/bin/bashbug: rmail: not found /usr/bin/bashbug: mail failed: report saved in /home/jmarbas/dead.bashbug So I decided to send it to you as an attachment to this email instead. Hope this is ok. Thanks, Jerry dead.bashbug Description: Binary data