[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
\[ \] mishandled with -noediting
From: |
schwab |
Subject: |
\[ \] mishandled with -noediting |
Date: |
Thu, 13 Feb 2003 11:13:05 +0100 (CET) |
Configuration Information [Automatically generated, do not change]:
Machine: ia64
OS: linux
Compiler: gcc -I/usr/src/packages/BUILD/bash-2.05b
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='ia64'
-DCONF_OSTYPE='linux' -DCONF_MACHTYPE='ia64-suse-linux' -DCONF_VENDOR='suse'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -D_GNU_SOURCE -Wall
-pipe -g
uname output: Linux sykes 2.4.19 #1 Mon Jan 27 18:35:42 UTC 2003 ia64 unknown
unknown GNU/Linux
Machine Type: ia64-suse-linux
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
When bash is run with -noediting then the \[ \] markers in the
prompt string are output as ^A ^B characters. I think they should
be ignored at all, since there is no way to find out at the shell
level whether bash has been started with -noediting. Note that
Emacs will start Bash as an inferior shell with -noediting by
default in the next release, but the effect is also visible in
xterm.
Repeat-By:
$ bash -noediting
bash-2.05b$ PS1='\[\]\$ '
$
Fix:
--- parse.y.~1~ 2002-05-21 17:57:30.000000000 +0200
+++ parse.y 2003-02-13 10:59:06.000000000 +0100
@@ -4020,6 +4020,12 @@ decode_prompt_string (string)
#if defined (READLINE)
case '[':
case ']':
+ if (no_line_editing)
+ {
+ /* Ignore them. */
+ string++;
+ continue;
+ }
temp = (char *)xmalloc (3);
temp[0] = '\001';
temp[1] = (c == '[') ? RL_PROMPT_START_IGNORE :
RL_PROMPT_END_IGNORE;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- \[ \] mishandled with -noediting,
schwab <=