Path: csiph.com!fu-berlin.de!usenet.stanford.edu!not-for-mail From: =?koi8-r?Q?=E1=CC=C5=CB=D3=C5=CA_?= =?koi8-r?Q?=FB=C9=CC=C9=CE?= Newsgroups: gnu.bash.bug Subject: Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue Date: Tue, 26 Nov 2019 18:50:14 +0300 Lines: 16 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: 8bit X-Trace: usenet.stanford.edu 1574783428 21393 209.51.188.17 (26 Nov 2019 15:50:28 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Dennis Williamson Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID; bh=ngNgYBseXemXy2nd7ivcIuwlsFHNHPRXzVY49fMiHdE=; b=rEV9n34Df2Kwjgu+B0aSzQbl0sBte7i95rvwDpRBCv61LfHbYTfBiDWF6pQp/SPPf8JRfTDXUW2nDK+JAmkQkzLFq/8UoBwEoVjyVTnSAMHFL9vJo1gMQKC2wN3Tcy5vs1bdcKJGg76F5QEa3riQ/QhY76O2U+ryL72qLpUN+ac=; In-Reply-To: User-Agent: Evolution 3.30.5-1.1 Authentication-Results: smtp32.i.mail.ru; auth=pass smtp.auth=rootlexx@mail.ru smtp.mailfrom=rootlexx@mail.ru X-77F55803: BBE463BEF7A60BD05A78504BD2AC29411FA4F02123E218F938F1F1ECAB6A1FDB083FE4DF5CF13641E213D6764EFD682C X-7FA49CB5: 0D63561A33F958A5F7756368B74CB287434F157C24DB28EA6FFBD715F81CF0568941B15DA834481FA18204E546F3947C989FD0BDF65E50FBF6B57BC7E64490618DEB871D839B7333395957E7521B51C2545D4CF71C94A83E9FA2833FD35BB23D27C277FBC8AE2E8B60CDF180582EB8FBA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C22498235E4873E4B603B76E601842F6C81A12EF20D2F80756B5F5C318D1F9ECD513A76E601842F6C81A127C277FBC8AE2E8B37333994EB6B909F3AA81AA40904B5D99449624AB7ADAF37F910319684D6E05D725E5C173C3A84C3AA93A90EDF72B43465DE9D53B3EDDAE46C9A9530EBF72002C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F93F060FBA3C93C613B503F486389A921A5CC5B56E945C8DA X-Mailru-Sender: FD65D7C492470CAED3DD1703795F7E02C5523D610069E4A13B4E247FACCD831DE5F8C0F2D78969CE15D893B5EE9B869EC77752E0C033A69ED2A0601D20520849A97B7613133B5FEC3453F38A29522196 X-Mras: OK X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 94.100.177.92 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: <0d24d2c3c8109cc3b801bddb5daa394725eb521f.camel@mail.ru> X-Mailman-Original-References: <3dd641953467a3299265e479026fc40a7bb697d4.camel@mail.ru> <5DDC8DEC.7000602@tlinx.org> <7e3b83df07c20ccd75373f8804d2b0f2f930c773.camel@mail.ru> Xref: csiph.com gnu.bash.bug:15656 В Вт, 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?