You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating completion files with docopt-completion fails, when the user doesn't have the appropriate permissions.
confus@confusion:~$ docopt-completion ./decorator.py
Skipping file /usr/share/zsh/functions/Completion/_decorator.py, no permissions
Skipping file /etc/bash_completion.d/decorator.py.sh, no permissions
Proposed:
The program should try to place completion files in the user space directories (e.g. $HOME/.bash_completion.d for bash), when the above permisson error is detected or implement a --user-space option to specify/auto-detect these directories.
The text was updated successfully, but these errors were encountered:
For zsh, the tool already looks for both user-specific and system-wide locations and tries to output to all available paths:
ZSH with oh-my-zsh: The path $HOME/.oh-my-zsh must exist.
ZSH with Prezto: The path $HOME/.zprezto must exist.
ZSH with no addons: The path /usr/share/zsh/*/functions must exist.
BASH with bash-completion: The path /etc/bash_completion.d must exist.
For bash, I didn't know about $HOME/.bash_completion.d so the tool doesn't try that path. I'll add it. Thanks for the report.
In the meanwhile, you can run the tool with --manual-bash and it will generate the completion file in the local directory. Then, you can place it in the proper user-specific location that your system is configured to use.
I seem to remember there was a config file in /ect/ or /usr/share/bash-completion/ specifying where in the users' directories to look for bash completion scripts. To look that up, would be the best solution. However, I can't find the specification for the live of me. What I can find, is that the file $HOME/.bash_completions is always sourced so appending there might be the slightly saver choice.
I think it's $HOME/.bash_completion.d/ in every but the most obscure Linux distributions.
Currently:
Creating completion files with
docopt-completion
fails, when the user doesn't have the appropriate permissions.Proposed:
The program should try to place completion files in the user space directories (e.g.
$HOME/.bash_completion.d
for bash), when the above permisson error is detected or implement a--user-space
option to specify/auto-detect these directories.The text was updated successfully, but these errors were encountered: