-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a generate command for a default .tools.toml file (#62)
Resolves #52. The generate command also uses the --config flag to set the location of the generated file. Would it be a good idea to have some output when actually generating the config? Right now there is no actual response unless there is some file system error. ```bash $ cargo run -- --config test-tools.toml generate Compiling tool-sync v0.1.0 (/home/mitchell/rust/tool-sync) Finished dev [unoptimized + debuginfo] target(s) in 2.14s Running `target/debug/tool --config test-tools.toml generate`` $ cat test-tools.toml # This file was automatically generated by tool-sync # #store_directory = "$HOME/.tools.toml" # # [bat] # owner = "sharkdp" # repo = "bat" # exe_name = "bat" # tag = "latest" # [exa] # owner = "ogham" # repo = "exa" # exe_name = "exa" # tag = "latest" # [fd] # owner = "sharkdp" # repo = "fd" # exe_name = "fd" # tag = "latest" # [ripgrep] # owner = "BurntSushi" # repo = "ripgrep" # exe_name = "rg" # tag = "latest" ```
- Loading branch information
1 parent
eeed4bb
commit ab7cf4c
Showing
5 changed files
with
68 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod cli; | ||
pub mod schema; | ||
pub mod template; | ||
pub mod toml; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// This file only holds the template that is used to generate a default .tools.toml. | ||
|
||
pub const CONFIG_TEMPLATE: &str = r##"# # tool-sync default configuration file | ||
# https://github.com/chshersh/tool-sync | ||
# This file was automatically generated by tool-sync | ||
##################################################### | ||
# | ||
# | ||
# store_directory = "$HOME/.local/bin" | ||
# | ||
# tool-sync provides native support for some of the tools without the need to configure them | ||
# Uncomment the tools you want to have them | ||
# | ||
# [bat] | ||
# [difftastic] | ||
# [fd] | ||
# [ripgrep] | ||
# | ||
# To add configuration for other tools these are the config options: | ||
# [ripgrep] | ||
# owner = "BurntSushi" | ||
# repo = "ripgrep" | ||
# exe_name = "rg" | ||
# | ||
# # Uncomment to download a specific version or tag. | ||
# # Without this tag latest will be used | ||
# # tag = "13.0.0" | ||
# | ||
# | ||
# Asset name to download on linux OSes | ||
# asset_name.linux = "x86_64-unknown-linux-musl" | ||
# | ||
# uncomment if you want to install on macOS as well | ||
# asset_name.macos = "apple-darwin" | ||
# | ||
# uncomment if you want to install on Windows as well | ||
# asset_name.windows = "x86_64-pc-windows-msvc" | ||
"##; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters