From 6c2b984cc9b8fc7b4915de708931dad1db15f890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20T=C3=A4nzer?= Date: Thu, 2 Oct 2025 14:34:34 +0200 Subject: [PATCH] Install completions into BASH_COMPLETION_USER_DIR The recommended place to install completions to is the BASH_COMPLETION_USER_DIR which loads completions on demand. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f73bbcda..34f6f5b5 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,8 @@ source <(bazelisk completion bash) 2. Or emit the completion script into a file: ```shell -bazelisk completion bash > bash-complete.bash +mkdir -p ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions/ +bazelisk completion bash > ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions/bazel.bash ``` then copy this file to `/etc/bash_completion.d` (on Ubuntu) or source it in your