From 2b6ce30a70aa49c40438377c63d449e9018922ed Mon Sep 17 00:00:00 2001 From: Erutuon <5840197+Erutuon@users.noreply.github.com> Date: Fri, 19 Jun 2020 15:32:10 -0500 Subject: [PATCH] Fix redirection in `adb shell` `adb` shell by default sends stderr from the command to stdout, so that `adb pull nonexistent` will show the error message from the `find` command. `>` must be escaped so that redirection is done inside the command executed by `adb shell`. --- share/completions/adb.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/completions/adb.fish b/share/completions/adb.fish index 64acadfdb..085edaaed 100644 --- a/share/completions/adb.fish +++ b/share/completions/adb.fish @@ -49,7 +49,7 @@ function __fish_adb_run_command -d 'Runs adb with any -s parameters already give end function __fish_adb_list_packages - __fish_adb_run_command pm list packages 2>/dev/null | string replace 'package:' '' + __fish_adb_run_command pm list packages 2\>/dev/null | string replace 'package:' '' end @@ -67,9 +67,9 @@ function __fish_adb_list_files end # Return list of directories suffixed with '/' - __fish_adb_run_command find -H "$token*" -maxdepth 0 -type d 2>/dev/null | awk '{print $1"/"}' + __fish_adb_run_command find -H "$token*" -maxdepth 0 -type d 2\>/dev/null | awk '{print $1"/"}' # Return list of files - __fish_adb_run_command find -H "$token*" -maxdepth 0 -type f 2>/dev/null + __fish_adb_run_command find -H "$token*" -maxdepth 0 -type f 2\>/dev/null end