Bug 771198 - Tab completion should work with characters instead of bytes
Tab completion should work with characters instead of bytes
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mksh (Show other bugs)
6.2
All All
unspecified Severity low
: rc
: ---
Assigned To: Michal Hlavinka
Jan Kepler
: Patch
Depends On: 745702
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-02 07:24 EST by Petr Šabata
Modified: 2014-05-26 09:09 EDT (History)
7 users (show)

See Also:
Fixed In Version: mksh-39-9.el6
Doc Type: Bug Fix
Doc Text:
Previously, the mksh shell worked with bytes instead of characters when looking for the common part of a file name. As a consequence, the common part of the file name could contain only the beginning part of the border character, and only a part of the character was printed. With this update, mksh works with whole characters when looking for the longest common prefix, and tab completion prints the correct common part as expected.
Story Points: ---
Clone Of: 745702
Environment:
Last Closed: 2014-05-22 09:16:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Šabata 2012-01-02 07:24:20 EST
+++ This bug was initially created as a clone of Bug #745702 +++

Description of problem:
Tab completion in mksh seems to work with bytes, not characters.  This results in a poor user experience when working with filenames in multibyte encodings.

Version-Release number of selected component (if applicable):
mksh-40b-2.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. mkdir t && touch t/십일 t/십이
2. Type 'ls t/' and hit <TAB>
  
Actual results:
t/십�

Expected results:
t/십

Additional info:
This should be reproducible with anything beyond ASCII range with UTF-8.

--- Additional comment from redhat-bugzilla@linuxnetz.de on 2011-12-25 23:59:30 CET ---

Thorsten, this sounds like something for you as upstream.

--- Additional comment from tg@mirbsd.org on 2011-12-26 21:02:09 CET ---

Agreed (thanks for the testcase and bringing it to my attention),
especially as the line editor behaves funnily afterwards… will fix.

--- Additional comment from tg@mirbsd.org on 2011-12-30 00:40:31 CET ---

Created attachment 550003 [details]
fix from mksh CVS

fixed upstream, thanks for the report

--- Additional comment from psabata@redhat.com on 2012-01-02 10:53:53 CET ---

Works like a charm, thank you for the fix!

--- Additional comment from redhat-bugzilla@linuxnetz.de on 2012-01-02 10:57:17 CET ---

Petr: Can you try to backport this patch into RHEL 6?

Thorsten: How far is the next mksh release? Shall I wait?

--- Additional comment from tg@mirbsd.org on 2012-01-02 11:25:32 CET ---

Robert: probably in 2-3 weeks, depending on the feedback I get for what’s
currently in the CVS branch R40-stable which I uploaded to Debian unstable.
You might want to package that (I just used R40d and a diff between that
and the current head of the R40-stable branch) in the meantime if you can’t
live without this fix. Be aware it contains less tested changes to the per-
sistent history code (which is why I’m reluctant to release now).

See also the recent mails on miros-mksh@ (via GMane)

--- Additional comment from psabata@redhat.com on 2012-01-02 13:23:01 CET ---

(In reply to comment #5)
> Petr: Can you try to backport this patch into RHEL 6?

This is a task for its RHEL maintainer, Michal Hlavinka (CC'd already).
I'll clone this bug for RHEL6.
Comment 1 Petr Šabata 2012-01-02 07:25:28 EST
A patch is available; see bug #745702.
Comment 12 errata-xmlrpc 2014-05-22 09:16:45 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0533.html

Note You need to log in before you can comment on or make changes to this bug.