Closed JamyGolden closed 8 months ago
@belak The profile_helper.sh
part of base16-shell is really a "manager" concept and not template related at all. Esp since it deals with base16-tmux, base16-fzf, base16-vim, etc in the hooks. It may be better to create a new repo for this so it doesn't live with the shell templates and colorschemes. What do you think?
I'm not sure how to distribute the binaries. I had a look at builder-go, but still not really sure how the binaries to download are put under "releases".
I haven't written tests yet. I'll do that once we're happy with everything and before I merge.
Sorting out a few more bugs, but I feel like it's pretty solid now. It now has an optional flag --repo-dir
which accepts a path to your local base16-shell directory. With that provided, when you run base16-shell list
and base16-shell set ocean
it will execute your local base16-shell/scripts
and base16-shell/hooks
. If you don't use the argument, it will use the scripts and hooks that existed at compile time. Still haven't added tests yet though.
Added integration tests
Closing this PR since development has moved to https://github.com/tinted-theming/tinty
I want to learn Rust and since I work on the base16-shell
profile_helper.sh
and hook scripts fairly often; I thought it might be nice to have something more robust while also learning Rust 😊 Any nitpicks are welcome since I don't know what are good practices and what aren't, etc :sweat_smile:At this point there are so many commits here it's essentially a way of commenting on a branch, so it might be easier to have a look at the branch over the "Files changed" tab, not sure: https://github.com/tinted-theming/base16-shell/tree/jamy/feature/rust-shell/src
Usage
Overview of the tool
Basic usage
cargo run set oceanicnext
cargo run list
Compiled usage
cargo build
will generate a binary at./target/debug/base16-shell
. Socargo build && ./target/debug/base16-shell list
should generate a list of available themes for example.Usage with the the
--repo-dir
optionThis allows users to have the cli tool to use their own local
base16-shell
repo. This can be useful for when you work on base16-shell so you don't need to compile the cli tool every time you do a template or hook change. By default the hooks and the colorscheme scripts are embedded and used by cli tool, but when you pass in--repo-dir
it doesn't use the embedded content.Todo
I'm looking into writing tests now.