[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Full-width characters can result in an unwanted space in filenames

From: Misaki
Subject: Re: Full-width characters can result in an unwanted space in filenames
Date: Mon, 6 Mar 2017 11:11:47 -0800

On Sat, Mar 4, 2017 at 11:54 AM, Chet Ramey <address@hidden> wrote:
On 3/4/17 12:53 AM, Misaki wrote:

> 15 Mar 2015
> bash bug
> Full-width character, followed by at least one full word with a space after it.
> Example: あa a
> With trailing space.
> Typing before the full-width character causes the 'あ' to be pushed to next
> line, with a blank space on previous line though if selected and copied it
> will actually produce a space.

This is a display artifact. If there is one physical space left on the
screen line, but the character to be printed occupies more than one space,
bash needs to wrap before the end of the screen line, and it needs to
keep track of that.  It uses a space on the display, but that space doesn't
appear in the readline buffer and the readline movement commands skip over

At the risk of annoying people, I am replying to all.

If a filename is displayed with 'ls', an extra space won't be copied if you highlight and copy it (including middle-click paste/X selection). Is it not possible to have user input work the same way?

(Though 'ls' piped to 'more' results in both incorrect display with a fullwidth character at the newline missing, and less useful copying with the displayed space and newline copied into the pasted text, and 'less' doesn't have either of these problems.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]