Rework push to use a function that accepts an argument

This commit is contained in:
Thomas Avé 2024-09-14 17:46:22 +02:00
parent d47afbf174
commit b669606c4d
2 changed files with 10 additions and 1 deletions

View File

@ -120,7 +120,6 @@
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
ag =
"rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
push = ''git add -A && git commit -m "`date`" && git push'';
reset = "tput reset";
};
history.size = 10000000;

View File

@ -83,3 +83,13 @@ function register_key() {
bindkey -M vicmd "^$1" $2
bindkey -M viins "^$1" $2
}
function push() {
git add -A
if [ -z "$1" ]; then
git commit -m "`date`"
else
git commit -m "$1"
fi
git push
}