|
@@ -1,4 +1,4 @@
|
|
-#!/bin/zsh
|
|
|
|
|
|
+#!/usr/bin/env zsh
|
|
|
|
|
|
# WARP DIRECTORY
|
|
# WARP DIRECTORY
|
|
# ==============
|
|
# ==============
|
|
@@ -8,7 +8,7 @@
|
|
# @github.com/mfaerevaag/wd
|
|
# @github.com/mfaerevaag/wd
|
|
|
|
|
|
# version
|
|
# version
|
|
-readonly WD_VERSION=0.7.0
|
|
|
|
|
|
+readonly WD_VERSION=0.9.0
|
|
|
|
|
|
# colors
|
|
# colors
|
|
readonly WD_BLUE="\033[96m"
|
|
readonly WD_BLUE="\033[96m"
|
|
@@ -90,7 +90,6 @@ Commands:
|
|
clean Remove points warping to nonexistent directories (will prompt unless --force is used)
|
|
clean Remove points warping to nonexistent directories (will prompt unless --force is used)
|
|
|
|
|
|
-v | --version Print version
|
|
-v | --version Print version
|
|
- -d | --debug Exit after execution with exit codes (for testing)
|
|
|
|
-c | --config Specify config file (default ~/.warprc)
|
|
-c | --config Specify config file (default ~/.warprc)
|
|
-q | --quiet Suppress all output
|
|
-q | --quiet Suppress all output
|
|
-f | --force Allows overwriting without warning (for add & clean)
|
|
-f | --force Allows overwriting without warning (for add & clean)
|
|
@@ -426,7 +425,6 @@ wd_export_static_named_directories() {
|
|
WD_CONFIG=${WD_CONFIG:-$HOME/.warprc}
|
|
WD_CONFIG=${WD_CONFIG:-$HOME/.warprc}
|
|
local WD_QUIET=0
|
|
local WD_QUIET=0
|
|
local WD_EXIT_CODE=0
|
|
local WD_EXIT_CODE=0
|
|
-local WD_DEBUG=0
|
|
|
|
|
|
|
|
# Parse 'meta' options first to avoid the need to have them before
|
|
# Parse 'meta' options first to avoid the need to have them before
|
|
# other commands. The `-D` flag consumes recognized options so that
|
|
# 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 \
|
|
c:=wd_alt_config -config:=wd_alt_config \
|
|
q=wd_quiet_mode -quiet=wd_quiet_mode \
|
|
q=wd_quiet_mode -quiet=wd_quiet_mode \
|
|
v=wd_print_version -version=wd_print_version \
|
|
v=wd_print_version -version=wd_print_version \
|
|
- d=wd_debug_mode -debug=wd_debug_mode \
|
|
|
|
f=wd_force_mode -force=wd_force_mode
|
|
f=wd_force_mode -force=wd_force_mode
|
|
|
|
|
|
if [[ ! -z $wd_print_version ]]
|
|
if [[ ! -z $wd_print_version ]]
|
|
@@ -583,9 +580,4 @@ unset args
|
|
unset points
|
|
unset points
|
|
unset val &> /dev/null # fixes issue #1
|
|
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
|