Update dotsfile config with variable
This commit is contained in:
parent
0f927aa2a0
commit
ea0d66cb11
15
init.zsh
15
init.zsh
@ -102,19 +102,13 @@ alias ga="git add"
|
||||
alias gaa="git add -A"
|
||||
alias gco="git commit"
|
||||
gcm() {
|
||||
local args
|
||||
for arg; do
|
||||
args="${args} ${arg}"
|
||||
done
|
||||
local args="${@}"
|
||||
git commit -m "${args:1}" # remove the leading space
|
||||
}
|
||||
alias gca="git commit -a"
|
||||
gcam() {
|
||||
local args
|
||||
for arg; do
|
||||
args="${args} ${arg}"
|
||||
done
|
||||
git commit -am "${args:1}" # remove the leading space
|
||||
local args="${@}"
|
||||
git commit -am "${args}" # remove the leading space
|
||||
}
|
||||
alias gp="git push"
|
||||
alias gu="git pull"
|
||||
@ -122,8 +116,9 @@ alias gf="git fetch"
|
||||
alias gt="git status"
|
||||
|
||||
# Dotfile management
|
||||
[ -v ZSH_MANAGE_DOTFILES_REPO ] || ZSH_MANAGE_DOTFILES_REPO="${HOME}/src/dotfiles"
|
||||
function dots {
|
||||
local args=("--git-dir=${HOME}/src/dotfiles" '--work-tree=/' '--bare')
|
||||
local args=("--git-dir=${ZSH_MANAGE_DOTFILES_REPO}" '--work-tree=/' '--bare')
|
||||
if (( ${#} == 0 )); then
|
||||
(cd /
|
||||
for file in $(git ${args} ls-files); do
|
||||
|
Loading…
Reference in New Issue
Block a user