Rework push to use a function that accepts an argument
This commit is contained in:
parent
d47afbf174
commit
b669606c4d
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue