Bash autocompletions instructions don't work with standard perms #474

Closed
opened 2025-01-07 15:47:45 +00:00 by kawaiipunk · 2 comments
Owner

Abra version: 0.10.0-rc1-beta-8af87aa
Code:

cli/complete.go Lines 14 to 22 in 877c17fab5
Bash:
$ source <(abra autocomplete bash)
# To load autocompletion for each session, execute once:
# Linux:
$ abra autocomplete bash > /etc/bash_completion.d/abra
# macOS:
$ abra autocomplete bash > $(brew --prefix)/etc/bash_completion.d/abra

Following instructions from abra autocomplete -h

Bash:

$ source <(abra autocomplete bash)

To load autocompletion for each session, execute once:

Linux:

$ abra autocomplete bash > /etc/bash_completion.d/abra

I get

abra autocomplete bash > /etc/bash_completion.d/abra
bash: /etc/bash_completion.d/abra: Permission denied

/etc/bash_completion.d and it's contents are owned by root on my Ubuntu 22.04 and I suspect many other distros.

@fauno said it should be "something like abra autocomplete bash | sudo tee /etc/bash_completion.d/abra >/dev/null"

Abra version: 0.10.0-rc1-beta-8af87aa Code: https://git.coopcloud.tech/toolshed/abra/src/commit/877c17fab5638d9e35670d2181a5cba9cb36e4da/cli/complete.go#L14-L22 Following instructions from `abra autocomplete -h` > Bash: > > $ source <(abra autocomplete bash) > > # To load autocompletion for each session, execute once: > # Linux: > $ abra autocomplete bash > /etc/bash_completion.d/abra > I get ``` abra autocomplete bash > /etc/bash_completion.d/abra bash: /etc/bash_completion.d/abra: Permission denied ``` `/etc/bash_completion.d` and it's contents are owned by root on my Ubuntu 22.04 and I suspect many other distros. @fauno said it should be "something like `abra autocomplete bash | sudo tee /etc/bash_completion.d/abra >/dev/null`"
kawaiipunk added the
bug
label 2025-01-07 15:47:45 +00:00
kawaiipunk added this to the v0.10.x project 2025-01-07 15:47:45 +00:00
decentral1se added the
release-candidate
label 2025-01-07 16:31:41 +00:00
decentral1se changed title from Abra 0.10.0: bash autocompletions instructions don't work with standard perms to Bash autocompletions instructions don't work with standard perms 2025-01-07 16:31:56 +00:00
Member

Could abra run these commands for you and run sudo when appropiate?

Could abra run these commands for you and run sudo when appropiate?
Author
Owner

Fix merged. Closing.

Fix merged. Closing.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: toolshed/abra#474
No description provided.