Skip to content

Commit

Permalink
complete: suppress error messages from "_adb"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 9, 2023
1 parent d721049 commit f2aa32b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -491,6 +491,7 @@
- edit: always adjust the terminal states with `bind -x` (reported by linwaytin) `#D1983` 5d14cf1
- syntax: suppress brace expansions in designated array initialization in Bash 5.3 `#D1989` 1e7b884
- progcomp: work around slow `nix` completion `#D1997` 2c1aacf
- complete: suppress error messages from `_adb` (reported by mozirilla213) `#D2005` xxxxxxx

## Test

Expand Down
3 changes: 3 additions & 0 deletions lib/core-complete.sh
Expand Up @@ -3637,6 +3637,9 @@ function ble/complete/progcomp/.compgen {
ble-import -f integration/nix-completion
ble/contrib:integration/nix-completion/adjust
fi

# https://github.com/akinomyoga/ble.sh/issues/292 (Android Debug Bridge)
ble/function#suppress-stderr _adb 2>/dev/null
fi
if [[ $comp_prog ]]; then
# aws
Expand Down
24 changes: 24 additions & 0 deletions note.txt
Expand Up @@ -6630,6 +6630,30 @@ bash_tips

2023-03-08

* complete: adb completion で "no devices/emulators found" というエラーメッセージ (reported by mozirilla213) [#D2005]
https://github.com/akinomyoga/ble.sh/issues/292

これは結局通常の bash での TAB 補完でも同様のエラーメッセージが発生するとい
う事だった。何が問題なのかは分からないが、ちゃんと設定されていない状態で補
完を試みようとするとエラーメッセージが表示されるという事なのだろうか。設定
されていても設定されていなくても補完の途中でエラーメッセージは出すべきでは
ない気がするが、取り敢えずエラーメッセージは封殺する事にする。

* upstream に報告しようと思ったが何処に報告すれば良いのかよく分からない。
platform/system/core に昔 adb.bash が含まれていた? ような含まれていなかっ
た様だ。野良 repository に adb.bash が追加されていて、それが広まったとい
う可能性もある。或いは、大本の repository では管理していないが配布アーカ
イブには含まれていた?

sdk/bash_completion/adb.bash 的な物もあるようだが。これは大昔だ。
https://android.googlesource.com/platform/sdk/+/3056c8e/bash_completion/adb.bash

ここにもあるがこれは報告者の使っている物とは微妙に異なる様だ。
https://github.com/mbrubeck/android-completion

結局よく分からない。Google が何処か人目に触れないところで最新版を管理して
いて配布しているという事なのだろうか。

* decode: M-S-o in konsole? (reported by mozirilla213) [#D2004]
https://github.com/akinomyoga/ble.sh/issues/298

Expand Down

0 comments on commit f2aa32b

Please sign in to comment.