Closed chopfitzroy closed 1 year ago
So sheldon allows you to configure the install using templates. I'm wondering if that would work for you?
You could symlink the completion file to an existing directory and add that location to the fpath
.
# sheldon 0.7.x config file
[templates]
completion = "ln -sf {{ files.0 }} /path/to/completions/_{{ name }}" # only uses first matched file
[plugins.sheldon]
remote = "https://github.com/rossmacarthur/sheldon/blob/trunk/completions/sheldon.zsh"
apply = ["completion"]
[plugins.bat]
remote = "https://github.com/sharkdp/bat/blob/master/assets/completions/bat.zsh.in"
apply = ["completion"]
[plugins.vcsh]
remote = "https://github.com/RichiH/vcsh/blob/main/completions/vcsh.zsh"
apply = ["completion"]
[plugins.fpath]
inline = "fpath=( /path/to/completions $path )"
You can verify the generated script by running sheldon source
manually
This is amazing! This will absolutely cover my use case.
Would it be possible to extend the remote option to support renaming of files and using things like
apply
?Ideally I would be able to do something like this:
There are a number of repositories that have Zsh completions defined in files with names
command.zsh
or similar, from my understanding completions must always be defined as_command
. A couple of examples:I was hoping it would be possible to extend
remote
to support renaming of files andapply
.