Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15657

Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue

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 <dennistwilliamson@gmail.com>
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 <mailman.2723.1574785424.13325.bug-bash@gnu.org> (permalink)
References <3dd641953467a3299265e479026fc40a7bb697d4.camel@mail.ru> <5DDC8DEC.7000602@tlinx.org> <7e3b83df07c20ccd75373f8804d2b0f2f930c773.camel@mail.ru> <CANaoh6JYE8PjT5xJQVCDOF8sCgkH5fQq=0XacM8h9PwNfJ-bwQ@mail.gmail.com> <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru> <CANaoh6+vuy=fL6_dvhnw=_+A7YrVHOrs_dLaSVQZ1uYoNeg76g@mail.gmail.com>
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 <bug-bash@gnu.org>
To Алексей Шилин <rootlexx@mail.ru>
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 <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CANaoh6+vuy=fL6_dvhnw=_+A7YrVHOrs_dLaSVQZ1uYoNeg76g@mail.gmail.com>
X-Mailman-Original-References <3dd641953467a3299265e479026fc40a7bb697d4.camel@mail.ru> <5DDC8DEC.7000602@tlinx.org> <7e3b83df07c20ccd75373f8804d2b0f2f930c773.camel@mail.ru> <CANaoh6JYE8PjT5xJQVCDOF8sCgkH5fQq=0XacM8h9PwNfJ-bwQ@mail.gmail.com> <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru>
Xref csiph.com gnu.bash.bug:15657

Show key headers only | View raw


On Tue, Nov 26, 2019, 9:50 AM Алексей Шилин <rootlexx@mail.ru> wrote:

> В Вт, 26/11/2019 в 07:35 -0600, Dennis Williamson пишет:
> > 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='\[\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.

>

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue Dennis Williamson <dennistwilliamson@gmail.com> - 2019-11-26 10:23 -0600

csiph-web