From 9ae880f6ac91f2a075e10792f475cda5870c7132 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 23 Jun 2020 09:02:26 +0200 Subject: [PATCH] Comment *why* adb needs its redirections hand-fed [ci skip] --- share/completions/adb.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/completions/adb.fish b/share/completions/adb.fish index 085edaaed..c3de96929 100644 --- a/share/completions/adb.fish +++ b/share/completions/adb.fish @@ -49,6 +49,9 @@ function __fish_adb_run_command -d 'Runs adb with any -s parameters already give end function __fish_adb_list_packages + # That "2\>" is to pass the redirection *to adb*. + # It sends stderr from commands it executes to its stdout as well. + # Why it does that, I don't know - crossing the streams is a bad idea (c.f. Ghostbusters) __fish_adb_run_command pm list packages 2\>/dev/null | string replace 'package:' '' end