rossmacarthur / sheldon

:bowtie: Fast, configurable, shell plugin manager
https://sheldon.cli.rs
Apache License 2.0
958 stars 21 forks source link

Sheldon command to fetch directory of plugin #137

Open rossmacarthur opened 2 years ago

rossmacarthur commented 2 years ago

It might be useful to get the location of a plugin dynamically based on the Sheldon install. For example if you wanted to set the ZSH environment variable for the location of the Oh My Zsh clone. It would be nice if there was a command line way of fetching this information.

Ideas

$ sheldon config --get plugins.oh-my-zsh.clone_dir
/Users/ross/.local/share/sheldon/repos/github.com/ohmyzsh/ohmyzsh
$ sheldon config --get plugins.pure.files
/Users/ross/.local/share/sheldon/repos/github.com/rossmacarthur/pure/async.zsh
/Users/ross/.local/share/sheldon/repos/github.com/rossmacarthur/pure/pure.zsh
# ~/.zshrc

export ZSH=$(sheldon config --dir oh-my-zsh)