From acb9b5a4608723f5553e9a5fa883316306a6399a Mon Sep 17 00:00:00 2001 From: Jxtopher <39927513+Jxtopher@users.noreply.github.com> Date: Sun, 28 Jul 2024 15:35:59 +0200 Subject: [PATCH] Removed unhelpful debug mode The return value of the 'wd' command is always '0' by default so it cannot be processed by another program. The return value is given as degguage mode associated with an exit which does not allow it to be used with '$?'. --- plugins/wd/wd.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 34f887a0e..d78ec826f 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/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) @@ -436,7 +435,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 +581,4 @@ unset args unset points unset val &> /dev/null # fixes issue #1 -if [[ -n $wd_debug_mode ]] -then - exit $WD_EXIT_CODE -else - unset wd_debug_mode -fi +return $WD_EXIT_CODE