[B007-3][CLI] Bash completion retains cached suggestions after completion.enabled is disabled in WSL

オープン 初心者向け
#1,326 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, csharp, shell
領域
cli

調査の方向性

レポートが参照している補完スクリプト completions/az.completions.bash から始めて、_az_clear_cache 関数と、az ne<Tab> のためにキャッシュされた候補リストが書き込まれ、読み出されるすべての箇所を見つけてください。その経路を、completion.enabled が false になった後に az --completion-candidates が行うことと比較してください — キャッシュは明らかに CLI ではなく Bash レイヤーだけから参照されています。issue の WSL 手順で再現し、その後、無効になっているときは補完が enabled フラグを確認する(またはキャッシュを破棄する)ようにしてください。完了とは、有効な補完が引き続き動作しつつ、ステップ 5 が _az_clear_cache を実行せずに network を提案しなくなることです。

索引モデルが issue の本文から書いたものです。

説明

act-observability-squad bug
Affected surface

CLI (az)

Describe the bug

Disabling completion.enabled does not immediately stop cached Bash completion suggestions. The CLI stops returning candidates, but Bash continues suggesting network until _az_clear_cache is called.

Command:

az ne<Tab>
Steps to reproduce
  1. In WSL Bash, select the native Linux AzCLIPS installation:
export PATH="$HOME/.local/share/azcli:$PATH"
hash -r
az --version
  1. Enable and load completion:
az config set --key completion.enabled --value true
source "$HOME/.local/share/azcli/completions/az.completions.bash"
  1. Type az ne and press Tab. It completes to az network. Press Ctrl+C to cancel the line without executing it.
  2. Paste and execute the following command without using Tab to complete it:
az config set --key completion.enabled --value false
  1. Type az ne and press Tab again in the same session.
  2. Verify the configuration and CLI response:
az config get --key completion.enabled --output json
az --completion-candidates
  1. Run _az_clear_cache and repeat az ne + Tab.
Errors & debug output
After disabling, az ne still completes to az network.
Configuration confirms:

{
  "key": "completion.enabled",
  "value": false,
  "source": "global config"
}


`az --completion-candidates` produces no output.
After _az_clear_cache, network is no longer suggested.
Expected behavior

Bash completion should honor completion.enabled=false immediately, without requiring manual cache clearing, as described in the completion documentation.

Environment
OS: Ubuntu 20.04.6 LTS on WSL
Shell: Bash
AzCLIPS CLI: 0.1.7, native Linux executable
.NET runtime: 10.0.14
Additional context

No response

主要言語
C#
スター
18
フォーク
10
平均マージ
1日 20時間
マージ済み PR(30日)
157

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure/azclips のほかの issue

Azure/azclips の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。