From de60b84da39bb2425827c8324ce3029d6e2520e5 Mon Sep 17 00:00:00 2001 From: "@zimeg" Date: Thu, 12 Sep 2024 14:32:00 -0700 Subject: [PATCH] feat!: remove the debug flag option --- README.md | 6 ------ test/tests.sh | 3 +-- wd.1 | 3 --- wd.sh | 8 -------- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/README.md b/README.md index 797aa2e..c11f91c 100644 --- a/README.md +++ b/README.md @@ -256,12 +256,6 @@ wd --version wd --config ./file ``` -* Force `exit` with return code after running. This is not default, as it will *exit your terminal*, though required for testing/debugging. - -```zsh -wd --debug -``` - * Silence all output: ```zsh diff --git a/test/tests.sh b/test/tests.sh index d4a9913..b36d90b 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -40,8 +40,7 @@ WD_PATH=${PWD}/.. wd() { - # run the local wd in debug mode - "${WD_PATH}"/wd.sh -d "$@" + "${WD_PATH}"/wd.sh "$@" } # MacOS's `wc` command adds extra padding to the front of the command. diff --git a/wd.1 b/wd.1 index 2f07e7c..650400d 100644 --- a/wd.1 +++ b/wd.1 @@ -53,9 +53,6 @@ Print the running version. .IP "-c, --config" Specifically set the config file (default `~/.warprc`), which is useful when testing. . -.IP "-d, --debug" -Force `exit` with return code after running. This is not default, as it will *exit your terminal*, though required when testing/debugging. -. .IP "-q, --quiet" Silence all output. . diff --git a/wd.sh b/wd.sh index 6b4afc0..ed1175b 100755 --- a/wd.sh +++ b/wd.sh @@ -90,7 +90,6 @@ Commands: clean Remove points warping to nonexistent directories (will prompt unless --force is used) -v | --version Print version - -d | --debug Exit after execution with exit codes (for testing) -c | --config Specify config file (default ~/.warprc) -q | --quiet Suppress all output -f | --force Allows overwriting without warning (for add & clean) @@ -426,7 +425,6 @@ wd_export_static_named_directories() { WD_CONFIG=${WD_CONFIG:-$HOME/.warprc} local WD_QUIET=0 local WD_EXIT_CODE=0 -local WD_DEBUG=0 # Parse 'meta' options first to avoid the need to have them before # other commands. The `-D` flag consumes recognized options so that @@ -436,7 +434,6 @@ zparseopts -D -E \ c:=wd_alt_config -config:=wd_alt_config \ q=wd_quiet_mode -quiet=wd_quiet_mode \ v=wd_print_version -version=wd_print_version \ - d=wd_debug_mode -debug=wd_debug_mode \ f=wd_force_mode -force=wd_force_mode if [[ ! -z $wd_print_version ]] @@ -583,9 +580,4 @@ unset args unset points unset val &> /dev/null # fixes issue #1 -if [[ -n $wd_debug_mode ]] -then - unset wd_debug_mode -fi - return $WD_EXIT_CODE