dotfiles/home/private_dot_config/zsh/completions/executable_update.sh

22 lines
364 B
Bash
Raw Normal View History

2023-03-20 09:19:27 -05:00
#!/usr/bin/env zsh
CURDIR=${0:a:h}
is-exe () {
[ -x "$(command -v $1)" ] && return 0 || return 1
}
gen() {
if is-exe "$1"; then
echo "$1 updated"
"$@" | sed "s#$HOME#\$HOME#g" >$CURDIR/"_$argv[1]"
else
echo "skipping $1"
fi
}
echo "GENERATING COMPLETION SCRIPTS"
echo "-----------------------------"
gen pdm completion zsh
2023-04-26 12:20:40 -05:00
gen chezmoi completion zsh