From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 5fd5786f for ; Fri, 17 Jan 2020 01:25:56 +0000 (UTC) Received: (qmail 11162 invoked by alias); 17 Jan 2020 01:25:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45319 Received: (qmail 19358 invoked by uid 1010); 17 Jan 2020 01:25:48 -0000 X-Qmail-Scanner-Diagnostics: from mail-yw1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25691. spamassassin: 3.4.2. Clear:RC:0(209.85.161.41):SA:0(-1.9/5.0):. Processed in 1.843435 secs); 17 Jan 2020 01:25:48 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.161.41 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Ml+6XjR2BfsdEYziIZn2oEB2RrhxbT8OO/O5tJ5M1sc=; b=AzrU+9Erugg0OXgjklZmBrYkzX6EkD7+HXG7kR1V40mxebmPqvnPMrv6h76Y5LiK5n UkH5ayPQoF1XMmPjdj2KKb9hsBkoZd9+sGIg+hqUCuxYhydYFcdN0xTsD8tRxMb6I91I H7gKxPWoWWtfNZUqWJj7FmGDgm5ZLcCSHqdfHzqwJ7nTuJNDPLjffKfPq/JZ9YMssLo8 G9+CBj/fmuppLUA0OZX9bZA3gpUmUhBu4EWTdzjupZzf7sWzH0S/ippeSLx0ZVvMp87/ V1YHAaMDezKJznR9e18diUKzLkyHnkqfX9u5ISCBqKPi7H6WaO4aoLnRXpCedd1IEoSL m9Tg== X-Gm-Message-State: APjAAAV/QM4f/ma45LY7biZxFxa+jy8y1G2kDCXNW6K93fOl5LQ8cM8d VDOUGZIeRvslxk9mVvXUqNgHauoVyrH0CQ== X-Google-Smtp-Source: APXvYqz4NIwczAgxIQf+rC/Qkc+MZnTcNyn6xKwBdpMkovbVqc/FLMtGtumZlii/2ezy6jUdGv7cWQ== X-Received: by 2002:a81:7785:: with SMTP id s127mr23684314ywc.427.1579224313064; Thu, 16 Jan 2020 17:25:13 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: unicode in prompt breaks command search From: dana In-Reply-To: Date: Thu, 16 Jan 2020 19:25:11 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <6D242ADC-BAEC-450D-B7BC-974988C38066@dana.is> References: To: Nathan Sidwell X-Mailer: Apple Mail (2.3445.104.11) On 16 Jan 2020, at 15:43, Nathan Sidwell wrote: > For reasons, I put a multibyte unicode char in $PROMPT, this ends up = messing > with zsh's idea of the current column, as it doesn't understand the = display > width of $PROMPT. You need to tell it what it is with the %{/%} and/or %G escape = sequences. For example, all of these are roughly equivalent and let zsh know that = =E3=82=A2=E3=82=A4=E3=82=A6=E3=82=A8=E3=82=AA takes up ten columns: PROMPT=3D'%10{=E3=82=A2=E3=82=A4=E3=82=A6=E3=82=A8=E3=82=AA%}' PROMPT=3D'%{=E3=82=A2=E3=82=A4=E3=82=A6=E3=82=A8=E3=82=AA%10G%}' PROMPT=3D'%{%2G=E3=82=A2%2G=E3=82=A4%2G=E3=82=A6%2G=E3=82=A8%2G=E3=82=AA= %}' %{...%} without a leading digit or embedded %G is zero-width (useful for invisible escape sequences). = http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Visual-effect= s (I don't think the behaviour of these sequences has changed since 5.2, = but you can check your zshmisc(1) to be sure) dana