From 87f3c5093157bafc0659c1c58a3e06769cd32513 Mon Sep 17 00:00:00 2001 From: adidalal Date: Wed, 1 Jun 2022 15:56:40 +0000 Subject: [PATCH] setup: add macOS --- docs/how-to/set-up-backups.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/how-to/set-up-backups.md b/docs/how-to/set-up-backups.md index 76e448da0..44839fd32 100644 --- a/docs/how-to/set-up-backups.md +++ b/docs/how-to/set-up-backups.md @@ -92,6 +92,7 @@ installing borgmatic: * [Alpine Linux](https://pkgs.alpinelinux.org/packages?name=borgmatic) * [OpenBSD](http://ports.su/sysutils/borgmatic) * [openSUSE](https://software.opensuse.org/package/borgmatic) + * [macOS (via Homebrew)](https://formulae.brew.sh/formula/borgmatic) * [Ansible role](https://github.com/borgbase/ansible-role-borgbackup) * [virtualenv](https://virtualenv.pypa.io/en/stable/) @@ -314,7 +315,7 @@ how you installed borgmatic, this may be enabled by default. But if it's not, you can install the shell completion script globally: ```bash -sudo su -c "borgmatic --bash-completion > /usr/share/bash-completion/completions/borgmatic" +sudo su -c "borgmatic --bash-completion > $(pkg-config --variable=completionsdir bash-completion)/borgmatic" ``` Alternatively, if you'd like to install the script for just the current user: @@ -327,6 +328,7 @@ borgmatic --bash-completion > ~/.local/share/bash-completion/completions/borgmat In either case, you may also need to install the `bash-completion` Linux package and restart your shell (`exit` and open a new shell). +For macOS, you can enable shell completion by setting up [`bash-completion@2`](https://formulae.brew.sh/formula/bash-completion@2) and then running above global command. `sudo` is not required. ### Colored output