bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Including \t, \T or \A at beginning of PS1 causes line wrap issues


From: David C. Rankin
Subject: Including \t, \T or \A at beginning of PS1 causes line wrap issues
Date: Wed, 15 Jan 2014 00:17:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Dear Bash gurus,

  I apologize if you get two of these reports, but my server responded that the
mail did not go through when I exited vi. Here is the contents generated by
bashbug about the line wrap issue when including \t, \T or \A at beginning of 
PS1.

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-u
nknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale'
-DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H
   -I.  -I. -I./include -I./lib  -D_FORTIFY_SOURCE=2 -march=x86-64
-mtune=generic -O2 -pipe -fstack-protector --pa
ram=ssp-buffer-size=4
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/b
in' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout'
uname output: Linux phoinix 3.12.6-1-ARCH #1 SMP PREEMPT Fri Dec 20 19:39:00 CET
2013 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.2
Patch Level: 45
Release Status: release

Description:
        Including the current time in the prompt causes line wrap issues on the
command line. This is apparently a regression because for at least 4 out of 5 of
the past years this problem was not present. Specifically if long c ommand lines
wrap, then it is impossible to edit the command line by using up-arrow to put
the old command on the command line due to this wrap issue. Here is an example:

  The command line at issue was:

diff -uNr ../hal/src/hal-0.5.14/policy/Makefile.am hal-0.5.14/policy/Makefile.am

export PS1="\A \h:\w> "

  Then attempting to recall and edit the command with up-arrow, result in
variations of the following:

  With \A:

22:15 phoinix:/dat_e/tde/tstbld/srcnew/bld/halo> diff -uNr
../hal/src/hal-0.5.14/policy/Makefile.am hal-0.5.14/pol/Makefile.am

  Now attempting with \t:

22:39:28 phoinix:/dat_e/tde/tstbld/srcnew/bld/halo> diff -uNr
../hal/src/hal-0.5.14/policy/Makefile.am hal-0.5.14/icy/Makefile.am

phoinix:/dat_e/tde/tstbld/srcnew/bld/halo> diff -uNr
../hal/src/hal-0.5.14/policy/Makefile.am hal-0.5.14/policy/Ma ile.am
phoinix:/dat_e/tde/tstbld/srcnew/bld/halo> diff -uNr
../hal/src/hal-0.5.14/policy/Makefile.am hal5.14/policy/Makef ile.am

  Now eliminating the \t and the prompt returns to normal:

22:45:47 phoinix:/dat_e/tde/tstbld/srcnew/bld/halo>  export PS1="\h:\w> "
phoinix:/dat_e/tde/tstbld/srcnew/bld/halo> diff -uNr
../hal/src/hal-0.5.14/policy/Makefile.am hal-0.5.14/policy/Ma ile.am

Repeat-By:
        Include either \t or \T or \A (my preferred prompt) at the beginning of
the PS1 prompt designation and execute a command line that wraps and you will
experience missing character when attempting to re-edit the command.

Fix:
        Haven't a clue, but I know it was fixed before sometime around 2008/2009
and now it is back. Bummer. Let me know if you need any additional information.
Thank you.


-- 
David C. Rankin, J.D.,P.E.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]