antidote/functions/__antidote_version

12 lines
318 B
Bash

#!/bin/zsh
### Get the antidote version.
#function __antidote_version {
emulate -L zsh; setopt local_options $_adote_funcopts
0=${(%):-%x}
local ver='1.9.11'
local gitsha=$(git -C "${0:A:h:h}" rev-parse --short HEAD 2>/dev/null)
[[ -z "$gitsha" ]] || ver="$ver ($gitsha)"
print "antidote version $ver"
#}