# \`rclone completion\` add option to write its output to stdout

**URL:** <https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295>\
**Category:** Feature\
**Created:** [August 19, 2025, 8:06pm UTC](https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295 "2025-08-19T20:06:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [August 19, 2025, 8:06pm UTC](https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295/1 "2025-08-19T20:06:31Z")

</div>

`rclone completion` writes its output to typical Linux destination, e.g. `rclone completion bash` to `/etc/bash_completion.d/rclone` which is not the right path on macOS where it is usually `$(brew --prefix)/etc/bash_completion.d` .

I do not expect rclone to deal with macOS oddities but it would be nice if `rclone completion` could write its output to terminal. This way user could easily redirect it to whatever file location needed.

At the moment it is not possible to generate completions on macOS:

```bash
$ rclone completion bash
2025/08/19 21:51:30 CRITICAL: open /etc/bash_completion.d/rclone: no such file or directory

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [August 19, 2025, 9:27pm UTC](https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295/2 "2025-08-19T21:27:24Z")

</div>

You should be able to do

```bash
rclone completion bash -

```

To write to stdout or put a file name.

---

<div class="post-metadata">

**Author:** ![kapitainsky](https://forum.rclone.org/user_avatar/forum.rclone.org/kapitainsky/32/14450_2.png) [@kapitainsky](https://forum.rclone.org/u/kapitainsky)\
**Post date:** [August 20, 2025, 3:27am UTC](https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295/3 "2025-08-20T03:27:33Z")

</div>

> [@ncw](#):
>
> `rclone completion bash -`

Thank you for pointing me into the right direction:) Indeed it works.

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [October 19, 2025, 3:28am UTC](https://forum.rclone.org/t/rclone-completion-add-option-to-write-its-output-to-stdout/52295/4 "2025-10-19T03:28:08Z")

</div>

Closed on October 19, 2025, 3:28am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
