From b978f0491000a27ad9ac8340e7151c908df71db5 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 8 Jan 2025 12:09:51 +0100 Subject: [PATCH 1/2] fix: use "sudo tee" to avoid permissions error See https://git.coopcloud.tech/toolshed/abra/issues/474 --- cli/complete.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/complete.go b/cli/complete.go index 488a81c3..0b86c262 100644 --- a/cli/complete.go +++ b/cli/complete.go @@ -17,9 +17,9 @@ Bash: # To load autocompletion for each session, execute once: # Linux: - $ abra autocomplete bash > /etc/bash_completion.d/abra + $ abra autocomplete bash | sudo tee /etc/bash_completion.d/abra # macOS: - $ abra autocomplete bash > $(brew --prefix)/etc/bash_completion.d/abra + $ abra autocomplete bash | sudo tee $(brew --prefix)/etc/bash_completion.d/abra Zsh: -- 2.49.0 From b6009057a848f9dcae923deabfe739a62c622c3d Mon Sep 17 00:00:00 2001 From: decentral1se Date: Wed, 8 Jan 2025 12:10:17 +0100 Subject: [PATCH 2/2] docs: note temp autocomplete, less whitespace --- cli/complete.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cli/complete.go b/cli/complete.go index 0b86c262..7f520df9 100644 --- a/cli/complete.go +++ b/cli/complete.go @@ -12,7 +12,7 @@ var AutocompleteCommand = &cobra.Command{ Long: `To load completions: Bash: - + # Load autocompletion for the current Bash session $ source <(abra autocomplete bash) # To load autocompletion for each session, execute once: @@ -22,7 +22,6 @@ Bash: $ abra autocomplete bash | sudo tee $(brew --prefix)/etc/bash_completion.d/abra Zsh: - # If shell autocompletion is not already enabled in your environment, # you will need to enable it. You can execute the following once: @@ -34,14 +33,12 @@ Zsh: # You will need to start a new shell for this setup to take effect. fish: - $ abra autocomplete fish | source # To load autocompletions for each session, execute once: $ abra autocomplete fish > ~/.config/fish/completions/abra.fish PowerShell: - PS> abra autocomplete powershell | Out-String | Invoke-Expression # To load autocompletions for every new session, run: -- 2.49.0