git,zsh:autoload: Move spull into own function
Move `git-track` into its own autoloadable function. This way it is better maintainable as in one-liner format and brings the possibility of having more complexity (e.g. for better portability). By that it is also now executable as `git-spull` as well as `git spull` as before.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
flog = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/glog\""
|
flog = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/glog\""
|
||||||
root = rev-parse --show-toplevel
|
root = rev-parse --show-toplevel
|
||||||
signoff = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/git-signoff\""
|
signoff = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/git-signoff\""
|
||||||
spull = "!__git_spull() { git pull \"$@\" && git submodule sync --recursive && git submodule update --init --recursive; }; __git_spull"
|
spull = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/git-spull\""
|
||||||
track = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/git-track\""
|
track = "!\"${XDG_CONFIG_HOME:-$HOME/.config}/zsh/autoload/git/git-track\""
|
||||||
[blame]
|
[blame]
|
||||||
date = short
|
date = short
|
||||||
|
|||||||
7
.config/zsh/autoload/git/git-spull
Executable file
7
.config/zsh/autoload/git/git-spull
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
emulate -L zsh -o err_return
|
||||||
|
|
||||||
|
git pull "$@"
|
||||||
|
git submodule sync --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
Reference in New Issue
Block a user