diff options
| -rw-r--r-- | lisp/net/tramp-adb.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index a6c2c142121..e9a3d001341 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el | |||
| @@ -58,7 +58,7 @@ It is used for TCP/IP devices." | |||
| 58 | 58 | ||
| 59 | ;;;###tramp-autoload | 59 | ;;;###tramp-autoload |
| 60 | (defcustom tramp-adb-prompt | 60 | (defcustom tramp-adb-prompt |
| 61 | "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" | 61 | "^\\(?:[[:digit:]]*|?\\)?\\(?:[[:alnum:]\e;[]*@?[[:alnum:]]*[^#\\$]*\\)?[#\\$][[:space:]]" |
| 62 | "Regexp used as prompt in almquist shell." | 62 | "Regexp used as prompt in almquist shell." |
| 63 | :type 'string | 63 | :type 'string |
| 64 | :version "24.4" | 64 | :version "24.4" |
| @@ -72,6 +72,7 @@ It is used for TCP/IP devices." | |||
| 72 | (defconst tramp-adb-ls-toolbox-regexp | 72 | (defconst tramp-adb-ls-toolbox-regexp |
| 73 | (concat | 73 | (concat |
| 74 | "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions | 74 | "^[[:space:]]*\\([-[:alpha:]]+\\)" ; \1 permissions |
| 75 | "\\(?:[[:space:]][[:digit:]]+\\)?" ; links (Android 7/ToolBox) | ||
| 75 | "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username | 76 | "[[:space:]]*\\([^[:space:]]+\\)" ; \2 username |
| 76 | "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group | 77 | "[[:space:]]+\\([^[:space:]]+\\)" ; \3 group |
| 77 | "[[:space:]]+\\([[:digit:]]+\\)" ; \4 size | 78 | "[[:space:]]+\\([[:digit:]]+\\)" ; \4 size |
| @@ -441,12 +442,15 @@ pass to the OPERATION." | |||
| 441 | "Determine `ls' command at its arguments." | 442 | "Determine `ls' command at its arguments." |
| 442 | (with-tramp-connection-property vec "ls" | 443 | (with-tramp-connection-property vec "ls" |
| 443 | (tramp-message vec 5 "Finding a suitable `ls' command") | 444 | (tramp-message vec 5 "Finding a suitable `ls' command") |
| 444 | (if (tramp-adb-send-command-and-check vec "ls --color=never -al /dev/null") | 445 | (cond |
| 445 | ;; On CyanogenMod based system BusyBox is used and "ls" output | 446 | ;; Can't disable coloring explicitly for toybox ls command |
| 446 | ;; coloring is enabled by default. So we try to disable it | 447 | ((tramp-adb-send-command-and-check vec "toybox") "ls") |
| 447 | ;; when possible. | 448 | ;; On CyanogenMod based system BusyBox is used and "ls" output |
| 448 | "ls --color=never" | 449 | ;; coloring is enabled by default. So we try to disable it |
| 449 | "ls"))) | 450 | ;; when possible. |
| 451 | ((tramp-adb-send-command-and-check vec "ls --color=never -al /dev/null") | ||
| 452 | "ls --color=never") | ||
| 453 | (t "ls")))) | ||
| 450 | 454 | ||
| 451 | (defun tramp-adb--gnu-switches-to-ash (switches) | 455 | (defun tramp-adb--gnu-switches-to-ash (switches) |
| 452 | "Almquist shell can't handle multiple arguments. | 456 | "Almquist shell can't handle multiple arguments. |