mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Add prek support to pre-commit plugin
This commit is contained in:
parent
834fbf3711
commit
1f8ec353df
2 changed files with 25 additions and 13 deletions
|
|
@ -1,8 +1,17 @@
|
|||
# Aliases for pre-commit
|
||||
alias prc='pre-commit'
|
||||
# Aliases for pre-commit (uses prek if available, else pre-commit)
|
||||
if command -v prek &> /dev/null; then
|
||||
_prc_cmd='prek'
|
||||
_prc_autoupdate='auto-update'
|
||||
else
|
||||
_prc_cmd='pre-commit'
|
||||
_prc_autoupdate='autoupdate'
|
||||
fi
|
||||
|
||||
alias prcau='pre-commit autoupdate'
|
||||
alias prc="$_prc_cmd"
|
||||
|
||||
alias prcau="$_prc_cmd $_prc_autoupdate"
|
||||
|
||||
alias prcr="$_prc_cmd run"
|
||||
alias prcra="$_prc_cmd run --all-files"
|
||||
alias prcrf="$_prc_cmd run --files"
|
||||
|
||||
alias prcr='pre-commit run'
|
||||
alias prcra='pre-commit run --all-files'
|
||||
alias prcrf='pre-commit run --files'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue