From owner-freebsd-bugs Mon Jun 19 16:40: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7BC2037B7E0 for ; Mon, 19 Jun 2000 16:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA67929; Mon, 19 Jun 2000 16:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from heitec.net (paladin.heitec.net [212.204.92.251]) by hub.freebsd.org (Postfix) with ESMTP id AB43037B8E5 for ; Mon, 19 Jun 2000 16:32:45 -0700 (PDT) (envelope-from bernd@heitec.net) Received: (from bernd@localhost) by heitec.net (8.9.3/8.9.3) id BAA00995; Tue, 20 Jun 2000 01:33:03 +0200 (CEST) (envelope-from bernd) Message-Id: <200006192333.BAA00995@ heitec.net> Date: Tue, 20 Jun 2000 01:33:03 +0200 (CEST) From: bdluevel@heitec.net Reply-To: bdluevel@heitec.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: misc/19388: bash prompt problem, or perhaps curses problem Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19388 >Category: misc >Synopsis: bash prompt problem, or perhaps curses problem >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 19 16:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Bernd Luevelsmeyer >Release: FreeBSD 4.0-STABLE i386 >Organization: Heitec AG >Environment: FreeBSD 4.0-Stable as of 2000-06-19 >Description: If you have escape sequences in a bash prompt, and execute several long commands (longer than one line) so that they are in the history buffer, and then press cursor-up and cursor-down to change between these commands, the prompt may be messed up and the displayed command lines too. >How-To-Repeat: I assume you are in a bash shell (port shells/bash2), in a cons50 terminal with 80 columns. a) Get a prompt with escape sequences: export PS1='\[\e[7m\]hello\[\e[m\]' b) Get suitable command into the history: ab ab ab ab ab ab ... ab (That is so many 'ab' groups that the last 'b' is in the second row exactly under the first 'l' of the prompt) c) Get second command so you've got something to change: cd cd cd cd cd cd ... cd (Make it the same length, so the last 'd' is also below the first 'l' of the prompt) d) Press cursor-up and cursor-down so you change between these two commands in bash's history. Watch the prompt. >Fix: Do not have escape sequences in the prompt. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message