Skip to content

Commit 7e5861c

Browse files
authored
Merge pull request #159 from mattmc3/v1.9.3
v1.9.3
2 parents 16e88d9 + dd62d49 commit 7e5861c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+196
-315
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.9.2
2+
current_version = 1.9.3
33
parse = v?(?P<major>\d+)\.(?P<minor>\d+)\.(?P<revision>\d+)
44
serialize = {major}.{minor}.{revision}
55

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# antidote
22

33
[![MIT License](https://img.shields.io/badge/license-MIT-007EC7.svg)](/LICENSE)
4-
![version](https://img.shields.io/badge/version-v1.9.2-df5e88)
4+
![version](https://img.shields.io/badge/version-v1.9.3-df5e88)
55

66
<a title="GetAntidote"
77
href="https://getantidote.github.io"
@@ -57,7 +57,7 @@ You can install the latest release of antidote by cloning it with `git`:
5757

5858
```zsh
5959
# first, run this from an interactive zsh terminal session:
60-
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote
60+
git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-$HOME}/.antidote
6161
```
6262

6363
### Install with a package manager

antidote

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
#
1010
function antidote {
1111
0=${(%):-%x}
12-
(( $+functions[antidote-main] )) || source ${0:A:h}/antidote.zsh
12+
if ! typeset -f antidote-main > /dev/null; then
13+
source ${0:A:h}/antidote.zsh
14+
fi
1315
antidote-main "$@"
1416
}
1517
antidote "$@"

functions/__antidote_bulk_clone

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
emulate -L zsh; setopt local_options $_adote_funcopts
66

77
# get a list of clonable repos from a bundle file
8-
awk '
8+
$__adote_awkcmd '
99
BEGIN { RS="[\r\n]" }
1010
1111
# initialize vars

functions/__antidote_filter_defers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Filter all but the first defer block.
44
#function __antidote_filter_defers {
55
emulate -L zsh; setopt local_options $_adote_funcopts
6-
awk '
6+
$__adote_awkcmd '
77
# filter all but the first time we source zsh-defer (a 4 line if statement)
88
BEGIN { skip=0; found=0 }
99
skip>0 { skip-- }

functions/__antidote_parse_bundles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Parse antidote's bundle DSL.
44
#function __antidote_parse_bundles {
55
emulate -L zsh; setopt local_options $_adote_funcopts
6-
awk '
6+
$__adote_awkcmd '
77
BEGIN { RS="[\r\n]" }
88
99
# skip comments and empty lines

functions/__antidote_setup

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
fpath=( "${0:A:h}" $fpath )
77
local fn
88
for fn in ${0:A:h}/*; do
9-
[[ $fn:t != '__antidote_setup' ]] || continue
10-
(( $+functions[${fn:t}] )) && unfunction ${fn:t}
9+
[[ ${fn:t} != '__antidote_setup' ]] || continue
10+
if typeset -f ${fn:t} > /dev/null; then
11+
unfunction ${fn:t}
12+
fi
13+
1114
# autoload extensionless function files
1215
[[ -z "${fn:e}" ]] && autoload -Uz "${fn}"
1316
done
@@ -29,4 +32,8 @@
2932
if zstyle -t ':antidote:tests' set-warn-options; then
3033
typeset -gHa _adote_funcopts=( $_adote_funcopts warn_create_global warn_nested_var )
3134
fi
35+
36+
gawk --version &>/dev/null && typeset -gH __adote_awkcmd=gawk || typeset -gH __adote_awkcmd=awk
37+
typeset -gHi __adote_ksh_arrays
38+
typeset -gHi __adote_sh_glob
3239
#}

functions/__antidote_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#function __antidote_version {
55
emulate -L zsh; setopt local_options $_adote_funcopts
66
0=${(%):-%x}
7-
local ver='1.9.2'
7+
local ver='1.9.3'
88
local gitsha=$(git -C "${0:A:h:h}" rev-parse --short HEAD 2>/dev/null)
99
[[ -z "$gitsha" ]] || ver="$ver ($gitsha)"
1010
print "antidote version $ver"

functions/_antidote

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
function _antidote_subcommands {
44
local usage=$(
55
antidote --help |
6-
awk '
6+
$__adote_awkcmd '
77
BEGIN{OFS=":"; p=0}
88
/^commands:$/ {p=1; next}
99
!p{next}

functions/antidote

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#
1010
#function antidote {
1111
0=${(%):-%x}
12-
(( $+functions[antidote-main] )) || source ${0:A:h:h}/antidote.zsh
12+
if ! typeset -f antidote-main > /dev/null; then
13+
source ${0:A:h:h}/antidote.zsh
14+
fi
1315
antidote-main "$@"
1416
#}

0 commit comments

Comments
 (0)