Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point
From:
Pádraig Brady
Subject:
Re: [PATCH] ls: Use pretty UTF-8 arrow when showing where symlinks point to
Date:
Wed, 12 Aug 2009 11:04:08 +0100
User-agent:
Thunderbird 2.0.0.6 (X11/20071008)
Jim Meyering wrote:
>
> - It's easy to get nearly the same effect with a simple filter,
> as Pádraig suggested. (of course, a naive filter fails if
> a file name contains " -> ", but the end result is solely for
> human consumption, not for mechanical parsing, so that's ok)
>
> Just by the way, I compared your arrow and the one Pádraig
> used in his example:
>
> $ printf 'a -> b\n'
> a -> b
> $ printf 'a \xe2\x86\x92 b\n'
> a → b
> $ printf 'a \u25aa\u25b6 b\n'
> a â–Şâ–¶ b
Just to address my OCD, the example alias I posted would not work
as somewhere along the line in pasting over a vnc session the
unicode characters were mangled. Also the previous alias didn't
precompute as much as it could, so:
alias lsf="ls -l --color | sed 's/ -> / $(tput bold)â–Şâ–¶$(tput sgr0) /'"
cheers,
Pádraig.