Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Dennis Williamson Newsgroups: gnu.bash.bug Subject: Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue Date: Tue, 26 Nov 2019 10:23:28 -0600 Lines: 24 Approved: bug-bash@gnu.org Message-ID: References: <3dd641953467a3299265e479026fc40a7bb697d4.camel@mail.ru> <5DDC8DEC.7000602@tlinx.org> <7e3b83df07c20ccd75373f8804d2b0f2f930c773.camel@mail.ru> <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1574785425 22216 209.51.188.17 (26 Nov 2019 16:23:45 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0KjQuNC70LjQvQ==?= Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VdYPWWeRGrjXqcEMr8D50IJWu5IiWanO/OAk1pAaz9k=; b=JfKFTojDZLY1kx/IixnuD/M1udRjT1vfwgYMKnLRSCL+GpyZ2XF4gnnlE1smjMwTzf UWmHBORb4bhn40/WcgjzaaIbCYox70K1Vv+RLRW9Mrhlx3TWPrFoMFPQ6RqU8kQMq9cd vrmXlU1vzhMhp7MNSlU3Xm72bmldNgRjCNvfGdB1XQISW9b72vwbm7kvA9W2JaFVvkRi i/WbH68rYjXbh+aO1O7F3aqrLI8WWJv21GqA5MK6LWg2CchgjJsz2JXhm6oTqrSRIFT3 tDYji57EXbC/JBgGvntTIpmDdvDrDDpPHF1BiGLZucYk8egtTa94L6zgmwDKBNIwC73x AYHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VdYPWWeRGrjXqcEMr8D50IJWu5IiWanO/OAk1pAaz9k=; b=Gf69nHjj3/4cqr70mCqaGKiNCHwXuVKBERRZzEPou0Av1hxVMxUm98AD4zqL9m5oAv dhgbT3OYzbC+fbOtED+RIGhxZtI5+eOq0UTpbLEVYNrNtd1ImCWQ6di3IwITsEppcyqn V1qkhrwlgJ2j+yEXxAbO1O7aG4inMvWE8LJql2236GyNBzDmrtRGt8tOQsO0sBI0J/fR PWtVc0T5G9SacdRg7SaWLHcQB4p/ACgCfef4j95c6nMcPLHu3cWQA5QbqqJu2ztrgacL XpKPm/jcoFi6T5vLMPhAs6yoXdN/9aTWIiIKfC/ptYWp2AIbajVhKFo0U/yKwlbgjWO1 3ikg== X-Gm-Message-State: APjAAAXDC4DA8kAQ/tay8CCraZaUCdwmG92RNi8bxpXnwIFDato7g1B4 /9PFAvxiKCO7T7Er73gBMMv9lqKQoAyrbbeprQ== X-Google-Smtp-Source: APXvYqxYxbSNkvvhh8k5//f0J74cgoteNqp/wGkFpU/s88eEE5zCn5XI6uZb5VUs6rU1ZZfDOokpoFDD6uO7zP9FnDc= X-Received: by 2002:adf:c649:: with SMTP id u9mr14350960wrg.20.1574785419513; Tue, 26 Nov 2019 08:23:39 -0800 (PST) In-Reply-To: <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <3dd641953467a3299265e479026fc40a7bb697d4.camel@mail.ru> <5DDC8DEC.7000602@tlinx.org> <7e3b83df07c20ccd75373f8804d2b0f2f930c773.camel@mail.ru> <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru> Xref: csiph.com gnu.bash.bug:15657 On Tue, Nov 26, 2019, 9:50 AM =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9 = =D0=A8=D0=B8=D0=BB=D0=B8=D0=BD wrote: > =D0=92 =D0=92=D1=82, 26/11/2019 =D0=B2 07:35 -0600, Dennis Williamson =D0= =BF=D0=B8=D1=88=D0=B5=D1=82: > > You have printable characters enclosed. For example, \u. _Each_ > > sequence of unprintable characters needs to be separately enclosed > > _without_ enclosing the printable ones. > > > > The first part of your prompt is what needs to be corrected. The > > latter part after "debian_chroot" is correct. > > Ah, you meant that it should be: > > PS1=3D'\[\e]0;\]\u@\h:\w\[\a\]${debian_chroot:+($debian_chroot)}\[\033[01 > ;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' > > Or the ']0;' part should be outside of '\[...\]', too? > No. As Greg pointed out, I missed the fact that the strings were part of the escape sequence for the terminal title. Sorry for the confusion. >