I guessed and guessed and guessed. And finally guessed
/adb::

Now doing (setq tramp-verbose 6)
I see

;; GNU Emacs: 25.1.1 Tramp: 2.2.13.25.1 -*- mode: outline; -*-
05:30:42.697847 tramp-adb-get-ls-command (5) # Finding a suitable ‘ls’ command
05:30:42.701049 tramp-adb-parse-device-names (6) # adb devices
05:30:42.703833 tramp-adb-parse-device-names (6) #
List of devices attached
GAAZCY06M061E5P device


Process adb finished
05:30:42.704177 tramp-adb-send-command (6) # ls --color=never -al /dev/null; 
echo tramp_exit_status $?
05:30:54.589709 tramp-file-name-handler (1) # Interrupt received in operation 
(file-attributes /adb::/)
ls --color=never -al /dev/null; echo tramp_exit_status $?
crw-rw-rw- 1 root root 1,   3 1970-03-26 01:34 1;33m/dev/null0m
tramp_exit_status 0
ASUS_Z012D:/ $
05:30:54.590180 tramp-file-name-handler (1) # Interrupt received in operation 
(file-exists-p /adb::/)
ls --color=never -al /dev/null; echo tramp_exit_status $?
crw-rw-rw- 1 root root 1,   3 1970-03-26 01:34 1;33m/dev/null0m
tramp_exit_status 0
ASUS_Z012D:/ $


;; GNU Emacs: 25.1.1 Tramp: 2.2.13.25.1 -*- mode: outline; -*-
05:30:42.697847 tramp-adb-get-ls-command (5) # Finding a suitable ‘ls’ command
05:30:42.701049 tramp-adb-parse-device-names (6) # adb devices
05:30:42.703833 tramp-adb-parse-device-names (6) #
List of devices attached
GAAZCY06M061E5P device


Process adb finished
05:30:42.704177 tramp-adb-send-command (6) # ls --color=never -al /dev/null; 
echo tramp_exit_status $?
05:30:54.589709 tramp-file-name-handler (1) # Interrupt received in operation 
(file-attributes /adb::/)
ls --color=never -al /dev/null; echo tramp_exit_status $?
crw-rw-rw- 1 root root 1,   3 1970-03-26 01:34 1;33m/dev/null0m
tramp_exit_status 0
ASUS_Z012D:/ $
05:30:54.590180 tramp-file-name-handler (1) # Interrupt received in operation 
(file-exists-p /adb::/)
ls --color=never -al /dev/null; echo tramp_exit_status $?
crw-rw-rw- 1 root root 1,   3 1970-03-26 01:34 1;33m/dev/null0m
tramp_exit_status 0
ASUS_Z012D:/ $

By the way,
ASUS_Z012D:/ $ ls --help
ls --help
usage: ls --color[=auto] [-ACFHLRSZacdfhiklmnpqrstux1] [directory...]

list files

what to show:
-a      all files including .hidden             -c  use ctime for timestamps
-d      directory, not contents                 -i  inode number
-k      block sizes in kilobytes                -p  put a '/' after dir names
-q      unprintable chars as '?'                -s  size (in blocks)
-u      use access time for timestamps          -A  list all files but . and ..
-H      follow command line symlinks            -L  follow symlinks
-R      recursively list files in subdirs       -F  append /dir *exe @sym |FIFO
-Z      security context

output formats:
-1      list one file per line                  -C  columns (sorted vertically)
-g      like -l but no owner                    -h  human readable sizes
-l      long (show full details)                -m  comma separated
-n      like -l but numeric uid/gid             -o  like -l but no group
-x      columns (horizontal sort)

sorting (default is alphabetical):
-f      unsorted        -r  reverse     -t  timestamp   -S  size
--color  device=yellow  symlink=turquoise/red  dir=blue  socket=purple
         files: exe=green  suid=red  suidfile=redback  stickydir=greenback
         =auto means detect if output is a tty.

It turns out for no color at all just don't use color.

I found

(defun tramp-adb-get-ls-command (vec)
  (with-tramp-connection-property vec "ls"
    (tramp-message vec 5 "Finding a suitable `ls' command")
    (if (tramp-adb-send-command-and-check vec "ls --color=never -al /dev/null")
        ;; On CyanogenMod based system BusyBox is used and "ls" output
        ;; coloring is enabled by default.  So we try to disable it
        ;; when possible.
        "ls --color=never"
      "ls")))
but it is too complicated for me to try to tell it otherwise.

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to