Progmasoft Git

tazel

A build system for C, C++, Objective-C, Objective-C++ and Zig, with C# project files.

Clonegit clone https://git.progmasoft.com/tazel

mainroot / tazel.plugin.zsh

708 B · Raw · Log

# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
# SPDX-License-Identifier: MIT
# Oh My Zsh (and Zsh plugin manager) plugin for Tazel.

if (( ! $+commands[tazel] )); then
    return
fi

if [[ -n "${ZSH_CACHE_DIR:-}" && -w "$ZSH_CACHE_DIR" ]]; then
    mkdir -p "$ZSH_CACHE_DIR/completions"
    if [[ ! -f "$ZSH_CACHE_DIR/completions/_tazel" || "$commands[tazel]" -nt "$ZSH_CACHE_DIR/completions/_tazel" ]]; then
        tazel shell-completion zsh >| "$ZSH_CACHE_DIR/completions/_tazel"
    fi
    fpath=("$ZSH_CACHE_DIR/completions" $fpath)
    autoload -Uz _tazel
    if (( $+functions[compdef] )); then
        compdef _tazel tazel
    fi
else
    source <(tazel shell-completion zsh)
fi