Skip to content

Commit

Permalink
update help to actually tell about the -t flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hlmtre committed Sep 16, 2021
1 parent 24bf0c2 commit 5cb3d9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hm"
version = "0.7.1"
version = "0.7.2"
authors = ["Matt Weller <[email protected]>"]
edition = "2018"
description = "homemaker. Slightly more than yet another dotfile manager."
Expand Down
8 changes: 4 additions & 4 deletions src/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ force = 'true'
[[obj]]
task = 'nvim'
method = 'execute'
solution = "test -x /usr/local/bin/nvim || (git clone https://github.com/neovim/nevim.git ~/src/ && cd ~/src/neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/usr/local/ && sudo make install)"
dependencies = ['vim-plug']
solution = "test -x /usr/local/bin/nvim || (git clone https://github.com/neovim/neovim.git ~/src/ && cd ~/src/neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_INSTALL_PREFIX=/usr/local/ && sudo make install)"
dependencies = ['packer']

[[obj]]
task = 'vim-plug'
task = 'packer'
method = 'execute'
solution = "sh -c 'curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'"
solution = "git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim"

[[obj]]
file = 'fish'
Expand Down
7 changes: 4 additions & 3 deletions src/hm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn main() {
for i in 0..args.len() {
match args[i].as_str() {
"-t" | "--task" => {
if args.len() > i && !args[i + 1].starts_with("-") {
if args.len() > i && !args[i + 1].starts_with('-') {
// ensure the next arg is not a flag
// assume the next one is the named task to complete
target_task = Some(args[i + 1].clone());
Expand All @@ -115,7 +115,7 @@ fn main() {
}
Err(e) => {
eprintln!("{}", e);
exit(1);
exit(0);
}
};
}
Expand Down Expand Up @@ -191,7 +191,8 @@ fn clean() -> std::io::Result<()> {
fn help() {
println!(
"usage:
hm [-h] | --clean | [-c|--config] [<config>]
hm [-h] | [-t|--task] [<task>] | --clean | [-c|--config] [<config>]
-t | --task > run specific named task
-h | --help > this help message
--clean > removes the contents of the log directory
-c | --config [config] > Optional.
Expand Down

0 comments on commit 5cb3d9f

Please sign in to comment.