-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I always specify only one shell in sheldon? #166
Comments
i would really like to see sth similar! |
What if you change XDG_CONFIG_HOME in your bashrc to like .bash_config? It might break things in bash but you do say that it's not your daily driver. you could even do something like, set XDG_CONFIG_HOME to a different directory, then run Sheldon source and finally reset XDG_CONFIG_HOME . This way temporarily it would use a different file. Not ideal but might be a possible workaround For example: |
That hack has a few problems:
Honestly, this should be easier to solve within sheldon, though admittedly I haven't looked at the code yet. I can lend a hand if this feature is acceptable. |
those are all good points. The only reason i am recommending my approach is because the OP does not seem to use bash as a daily driver. |
I am keen to solve this problem but I first want to check whether any of the existing sheldon features could solve this for everyone. 1. Separate config and data directoriesTypically for different shells most (if not all) the plugins are different so you can configure a separate config and data directory and have separate config files. For example for Bash you could put the config file at # ~/.bashrc
# suggested locations, these could be anywhere
export SHELDON_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/sheldon/bash"
export SHELDON_DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/sheldon/bash"
eval "$(sheldon source)" 2. ProfilesProfiles are available to select certain plugins. You can do this by setting [plugins.foobar_bash_plugin]
profiles = ["bash"]
github = "owner/foobar_bash_plugin"
use = ["*.sh"]
[plugins.foobar_fish_plugin]
profiles = ["fish"]
github = "owner/foobar_fish_plugin"
use = ["*.fish"] Then when using it you would do the following # ~/.bashrc
export SHELDON_PROFILE=bash
eval "$(sheldon source)" |
@rossmacarthur I don't know if you're looking for an opinion - so here's my two cents. I like option 1 more than 2. It helps keep the configuration separate for each shell. This makes sense where the dotfiles are managed using symlinks, like in case of GNU Stow. Another suggestion is to convert the environment variables to arguments. Like so: eval $(sheldon source bash) This is a convention for a lot of other tools (eg: |
For example:
(imagine a setting like this)
~/.config/sheldon/plugins.toml
I mainly use fish shell, but sometimes I use bash for features that are only available in bash.
The text was updated successfully, but these errors were encountered: