1
0
Fork 0
mirror of synced 2024-11-27 01:35:35 -05:00

[fasd] Use zsh style tests for empty vars

Closes #180
This commit is contained in:
ℳichiel ℛoos 2017-05-10 21:30:47 +02:00 committed by Eric Nielsen
parent 872926c84c
commit c58f9015ec

View file

@ -41,20 +41,20 @@ case $1 in
fi
# set default options
[ -z "$_FASD_DATA" ] && _FASD_DATA="$HOME/.fasd"
[ -z "$_FASD_BLACKLIST" ] && _FASD_BLACKLIST="--help"
[ -z "$_FASD_SHIFT" ] && _FASD_SHIFT="sudo busybox"
[ -z "$_FASD_IGNORE" ] && _FASD_IGNORE="fasd ls echo"
[ -z "$_FASD_SINK" ] && _FASD_SINK=/dev/null
[ -z "$_FASD_TRACK_PWD" ] && _FASD_TRACK_PWD=1
[ -z "$_FASD_MAX" ] && _FASD_MAX=2000
[ -z "$_FASD_BACKENDS" ] && _FASD_BACKENDS=native
[ -z "$_FASD_FUZZY" ] && _FASD_FUZZY=2
[ -z "$_FASD_VIMINFO" ] && _FASD_VIMINFO="$HOME/.viminfo"
[ -z "$_FASD_RECENTLY_USED_XBEL" ] && \
(( ! "${+_FASD_DATA}" )) && _FASD_DATA="$HOME/.fasd"
(( ! "${+_FASD_BLACKLIST}" )) && _FASD_BLACKLIST="--help"
(( ! "${+_FASD_SHIFT}" )) && _FASD_SHIFT="sudo busybox"
(( ! "${+_FASD_IGNORE}" )) && _FASD_IGNORE="fasd ls echo"
(( ! "${+_FASD_SINK}" )) && _FASD_SINK=/dev/null
(( ! "${+_FASD_TRACK_PWD}" )) && _FASD_TRACK_PWD=1
(( ! "${+_FASD_MAX}" )) && _FASD_MAX=2000
(( ! "${+_FASD_BACKENDS}" )) && _FASD_BACKENDS=native
(( ! "${+_FASD_FUZZY}" )) && _FASD_FUZZY=2
(( ! "${+_FASD_VIMINFO}" )) && _FASD_VIMINFO="$HOME/.viminfo"
(( ! "${+_FASD_RECENTLY_USED_XBEL}" )) && \
_FASD_RECENTLY_USED_XBEL="$HOME/.local/share/recently-used.xbel"
if [ -z "$_FASD_AWK" ]; then
if (( ! "${+_FASD_AWK}" )); then
# awk preferences
local awk; for awk in mawk gawk original-awk nawk awk; do
$awk "" && _FASD_AWK=$awk && break