summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ct23
-rw-r--r--man/5/caretaker.conf.pod6
-rw-r--r--provides/zsh/completions/_ct2
3 files changed, 21 insertions, 10 deletions
diff --git a/bin/ct b/bin/ct
index 468417a..c383092 100755
--- a/bin/ct
+++ b/bin/ct
@@ -56,16 +56,18 @@ if [[ -r $XDG_CONFIG_HOME/caretaker/caretaker.conf ]] {
# Parse commandline options
while [[ $1 == --* ]] {
case $1 in
- --auto-update) (( AUTOUPDATE = 1 )) ;;
- --no-auto-update) (( AUTOUPDATE = 0 )) ;;
- --colours) (( COLOURS = 1 )) ;;
- --no-colours) (( COLOURS = 0 )) ;;
- --magic-etc) (( MAGIC_ETC = 1 )) ;;
- --no-magic-etc) (( MAGIC_ETC = 0 )) ;;
- --progress) (( PROGRESS = 1 )) ;;
- --no-progress) (( PROGRESS = 0 )) ;;
- --quiet) (( SILENT = 1 )) ;;
- --no-quiiet) (( SILENT = 0 )) ;;
+ --auto-update) (( AUTOUPDATE = 1 )) ;;
+ --no-auto-update) (( AUTOUPDATE = 0 )) ;;
+ --colours) (( COLOURS = 1 )) ;;
+ --no-colours) (( COLOURS = 0 )) ;;
+ --hook-on-push) (( HOOK_ON_PUSH = 1 )) ;;
+ --no-hook-on-push) (( HOOK_ON_PUSH = 0 )) ;;
+ --magic-etc) (( MAGIC_ETC = 1 )) ;;
+ --no-magic-etc) (( MAGIC_ETC = 0 )) ;;
+ --progress) (( PROGRESS = 1 )) ;;
+ --no-progress) (( PROGRESS = 0 )) ;;
+ --quiet) (( SILENT = 1 )) ;;
+ --no-quiiet) (( SILENT = 0 )) ;;
--version) die "see '$0 version'\n" ;;
--help) die "see '$0 help'\n" ;;
@@ -97,6 +99,7 @@ if (( $#PKG_ROOTS == 0 )) {
: ${SILENT=0}
: ${AUTOUPDATE=1}
: ${GIT_USE_ORIGIN=1}
+: ${HOOK_ON_PUSH=1}
: ${COLOURS=1}
: ${MAGIC_ETC=1}
: ${PROGRESS=1}
diff --git a/man/5/caretaker.conf.pod b/man/5/caretaker.conf.pod
index 0e7b285..bf625a7 100644
--- a/man/5/caretaker.conf.pod
+++ b/man/5/caretaker.conf.pod
@@ -56,6 +56,12 @@ Automatically run checklinks on files (or, if present, dotfiles) in F<etc/>
Colorize the output (cyan for info messages, red for errors/warnings)
+=item B<HOOK_ON_PUSH>=I<boolean> (--hook-on-push) [1]
+
+Execute pre-update / post-update hooks when running C<< ct push >>.
+If set to 0, you need to run ct refresh by hand to execute these hooks after
+changing a package.
+
=item B<PROGRESS>=I<boolean> (--progress) [1]
Show a progress bar when performing tasks on all packages
diff --git a/provides/zsh/completions/_ct b/provides/zsh/completions/_ct
index 0d0b105..767ccd1 100644
--- a/provides/zsh/completions/_ct
+++ b/provides/zsh/completions/_ct
@@ -86,6 +86,8 @@ _arguments \
'--packageroot[package root]:url' \
'--colours[use colours]' \
'--no-colours[No colours]' \
+ '--hook-on-push[Execute hooks for ct push]' \
+ '--no-hook-on-push[Do not execute hooks for ct push]' \
'--progress[show progress bar]' \
'--no-progress[No progress bar]' \
':action:_ct_action' \