Subject: Re: bug#30594: [PATCH] Add coreutils 'ls' support for tramp adb

From: Michael Albinus <[email-masked]>
Date: Sat, 24 Feb 2018 21:56:51 +0100

Mathieu Othacehe <[email-masked]> writes:

Hi Mathieu,

> Support some Android derived systems where 'ls' binary is provided by
> GNU Coreutils.

Thanks for this! I cannot test myself,  so I'll trust that it works
proper. However,

> +     ;; Support Android derived systems where "ls" command is provided
> +     ;; by GNU Coreutils. Force "ls" to print one column and set
> +     ;; time-style to imitate other "ls" flavours.
> +     ((tramp-adb-send-command-and-check vec "ls --help | grep coreutils")
> +      "env COLUMNS=1 ls --time-style=long-iso")

I believe it is not future-safe to depend on any string in --help
output. The better approach is to test, whether the ls command accepts
the --time-style=long-iso argument. Something like

((tramp-adb-send-command-and-check vec "ls --time-style=long-iso /dev/null")

Could you pls check, whether it works like this?

Best regards, Michael.