#!/usr/bin/env zsh ## Author: druckdev ## Created: 2019-11-28 ## ## A clang-format wrapper that can take a path to a format file (everywhere on ## the system) with the -style flag local idx=${@[(I)-style*]} if (( ! idx )); then # No style flag given command clang-format "$@" return fi local style="${@[$idx]#-style}" prefix="" if [[ -n "$style" ]]; then # Flag was given in form -style=