bug-bash
[Top][All Lists]
Advanced

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

Re: Alias appends space character to end of non-latin string


From: Lawrence Velázquez
Subject: Re: Alias appends space character to end of non-latin string
Date: Tue, 05 Jul 2022 12:55:29 -0400
User-agent: Cyrus-JMAP/3.7.0-alpha0-713-g1f035dc716-fm-20220617.001-g1f035dc7

On Fri, Jul 1, 2022, at 4:07 AM, Vangelis Natsios wrote:
> When creating an alias containing a path ending with a non-latin (e.g.
> greek) directory name, a space character is appended to the end of the
> path, causing the alias to fail.

Not quite: Neither "paths" nor "non-Latin" characters are necessary,
and the space seems to be added at expansion, not definition.

    bash-5.1$ echo "$BASH_VERSION"
    5.1.16(1)-release
    bash-5.1$ locale
    LANG="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_CTYPE="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_ALL=
    bash-5.1$ alias a1='printf "<%s>\\n" áa'
    bash-5.1$ a1
    <áa>
    bash-5.1$ alias a2='printf "<%s>\\n" aá'
    bash-5.1$ a2
    <aá >
    bash-5.1$ alias a1 a2
    alias a1='printf "<%s>\\n" áa'
    alias a2='printf "<%s>\\n" aá'

-- 
vq



reply via email to

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