Lennart Poettering wrote:
> [Second version of the patch, makes this feature optional with --fancy-chars]

--fancy-chars :)
I'm not sure how serious this patch is.
How about:

alias lsf='ls -l --color | sed "s/ -> / $(tput bold)\u25aa\u25b6$(tput sgr0) /"'

cheers,
Pádraig.

p.s. this chunk is far too verbose

> +#ifdef HAVE_NL_LANGINFO
> +       static const char *arrow = NULL;
> +
> +       if (!arrow)
> +         {
> +           arrow = " -> ";
> +
> +           if (fancy_chars)
> +             {
> +               const char *cs;
> +               cs = nl_langinfo(CODESET);
> +
> +               if (cs && strcmp(cs, "UTF-8") == 0)
> +                 arrow = " \xe2\x86\x92 ";
> +             }
> +         }
> +       DIRED_FPUTS_LITERAL (arrow, stdout);
> +#else
>         DIRED_FPUTS_LITERAL (" -> ", stdout);
> +#endif

this is equivalent I think:

       static const char *arrow = " -> ";
#ifdef HAVE_NL_LANGINFO
       if (fancy_chars && STREQ (nl_langinfo (CODESET), "UTF-8"))
         arrow = " \xe2\x86\x92 ";
#endif
       DIRED_FPUTS_LITERAL (arrow, stdout);



Reply via email to