diff options
author | Daniel Sandler <dsandler@google.com> | 2010-08-19 01:10:18 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-02-03 15:26:29 -0500 |
commit | 9c73d17e870e448ea1f036bda70736ae0ae6bf2e (patch) | |
tree | 25dc1788cf0e499551464bf79cf3893a6755ae92 /adb | |
parent | 4585e0e9f76e2c51a7f4a9679ec8b8d25f9b5e63 (diff) | |
download | system_core-9c73d17e870e448ea1f036bda70736ae0ae6bf2e.zip system_core-9c73d17e870e448ea1f036bda70736ae0ae6bf2e.tar.gz system_core-9c73d17e870e448ea1f036bda70736ae0ae6bf2e.tar.bz2 |
Support an additional alias for 'adb shell.'
Change-Id: Ie8d667407fef8ee5a6c7ab86b30307fb61869170
Diffstat (limited to 'adb')
-rw-r--r-- | adb/commandline.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/adb/commandline.c b/adb/commandline.c index dcba83b..3600e5a 100644 --- a/adb/commandline.c +++ b/adb/commandline.c @@ -838,12 +838,24 @@ top: return adb_send_emulator_command(argc, argv); } - if(!strcmp(argv[0], "shell")) { + if(!strcmp(argv[0], "shell") || !strcmp(argv[0], "hell")) { int r; int fd; + char h = (argv[0][0] == 'h'); + + if (h) { + printf("\x1b[41;33m"); + fflush(stdout); + } + if(argc < 2) { - return interactive_shell(); + r = interactive_shell(); + if (h) { + printf("\x1b[0m"); + fflush(stdout); + } + return r; } snprintf(buf, sizeof buf, "shell:%s", argv[1]); @@ -877,6 +889,10 @@ top: adb_sleep_ms(1000); do_cmd(ttype, serial, "wait-for-device", 0); } else { + if (h) { + printf("\x1b[0m"); + fflush(stdout); + } return r; } } |