Skip to content

Commit

Permalink
disabling --remove for now
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonMFong committed Nov 2, 2024
1 parent aebd795 commit bfbe379
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ use std::fs;
static ARG_GETPATH_PREV: &'static str = "--prev";
static ARG_GETKEYS: &'static str = "--show-keys";
static ARG_ADD: &'static str = "--add";
static ARG_REMOVE: &'static str = "--remove";
static ARG_HELP: &'static str = "--help";
static ARG_SHOWALLKEYPAIRS: &'static str = "--show-all";
static ARG_GETVERSION: &'static str = "--version";

// TODO: investigate bug here
//static ARG_REMOVE: &'static str = "--remove";

/**
* outputs all args in a space-delimited list
*/
Expand Down Expand Up @@ -63,7 +65,7 @@ fn help() {
println!("{tool_name} {ARG_GETPATH_PREV} = cd back into previous directory");
println!("{tool_name} {ARG_GETKEYS} <path> = returns all keys for the path");
println!("{tool_name} {ARG_ADD} <key> <path> = adds key/path pair");
println!("{tool_name} {ARG_REMOVE} <key> = removes key/path pair via key");
//println!("{tool_name} {ARG_REMOVE} <key> = removes key/path pair via key");
println!("{tool_name} {ARG_SHOWALLKEYPAIRS} = shows all key pairs");
println!("{tool_name} {ARG_HELP} = gets help");

Expand Down Expand Up @@ -99,7 +101,7 @@ fn completion_zsh() -> Result<(), i32> {
println!("'{ARG_GETPATH_PREV}:cd back into previous directory' \\");
println!("'{ARG_GETKEYS}:returns all keys for the path' \\");
println!("'{ARG_ADD}:adds key/path pair' \\");
println!("'{ARG_REMOVE}:removes key/path pair via key' \\");
//println!("'{ARG_REMOVE}:removes key/path pair via key' \\");
println!("'{ARG_SHOWALLKEYPAIRS}:shows all key pairs' \\");
println!(")");
println!("_describe 'goto' subcmds");
Expand Down Expand Up @@ -127,8 +129,8 @@ fn run() -> Result<(), i32> {
print_keys_for_path(&args)?;
} else if args[1].eq(ARG_GETSUGKEYS) {
print_suggested_keys(&args)?;
} else if args[1].eq(ARG_REMOVE) {
remove_key_path(&args)?;
// } else if args[1].eq(ARG_REMOVE) {
// remove_key_path(&args)?;
} else if args[1].eq(ARG_SHOWALLKEYPAIRS) {
print_all_key_pairs()?;
} else if args[1].eq(ARG_GETPATH_PREV) {
Expand All @@ -149,10 +151,11 @@ fn run() -> Result<(), i32> {
fn print_all_accepted_args() -> Result<(), i32> {
println!(
"{ARG_GETPATH_PREV} {ARG_GETKEYS} \
{ARG_GETSUGKEYS} {ARG_ADD} {ARG_REMOVE} \
{ARG_GETSUGKEYS} {ARG_ADD} \
{ARG_HELP} {ARG_SHOWALLKEYPAIRS} \
{ARG_GETVERSION} {ARG_ACCEPTEDARGS} \
{ARG_COMPLETION_ZSH}");
//{ARG_REMOVE} \

Ok(())
}
Expand Down

0 comments on commit bfbe379

Please sign in to comment.