It seems `rclone completion bash` hardcoded `/etc/bash_completion.d/rclone`

What is the problem you are having with rclone?

$ rclone completion bash
2025/09/21 14:36:36 CRITICAL: open /etc/bash_completion.d/rclone: no such file or directory

My rclone is installed via nixpkgs (on macOS), so bash completion is not under /etc/bash_completion.d/, but it seems rclone completion bash still tries that for some reason.

Run the command 'rclone version' and share the full output of the command.

$ rclone version
rclone v1.71.0

  • os/version: darwin 15.6.1 (64 bit)
  • os/kernel: 24.6.0 (arm64)
  • os/type: darwin
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.25.0
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone completion bash

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

$ rclone -vv completion bash
2025/09/21 14:43:38 DEBUG : rclone: Version "v1.71.0" starting with parameters ["rclone" "-vv" "completion" "bash"]
2025/09/21 14:43:38 CRITICAL: open /etc/bash_completion.d/rclone: no such file or directory

welcome to the forum,

correct, as that is the default location.

however, that can be changed.
If you supply a path to a file as the command line argument, then the generated script will be written to that file