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 gaa="git add -A"
|
||||||
alias gco="git commit"
|
alias gco="git commit"
|
||||||
gcm() {
|
gcm() {
|
||||||
local args
|
local args="${@}"
|
||||||
for arg; do
|
|
||||||
args="${args} ${arg}"
|
|
||||||
done
|
|
||||||
git commit -m "${args:1}" # remove the leading space
|
git commit -m "${args:1}" # remove the leading space
|
||||||
}
|
}
|
||||||
alias gca="git commit -a"
|
alias gca="git commit -a"
|
||||||
gcam() {
|
gcam() {
|
||||||
local args
|
local args="${@}"
|
||||||
for arg; do
|
git commit -am "${args}" # remove the leading space
|
||||||
args="${args} ${arg}"
|
|
||||||
done
|
|
||||||
git commit -am "${args:1}" # remove the leading space
|
|
||||||
}
|
}
|
||||||
alias gp="git push"
|
alias gp="git push"
|
||||||
alias gu="git pull"
|
alias gu="git pull"
|
||||||
@ -122,8 +116,9 @@ alias gf="git fetch"
|
|||||||
alias gt="git status"
|
alias gt="git status"
|
||||||
|
|
||||||
# Dotfile management
|
# Dotfile management
|
||||||
|
[ -v ZSH_MANAGE_DOTFILES_REPO ] || ZSH_MANAGE_DOTFILES_REPO="${HOME}/src/dotfiles"
|
||||||
function dots {
|
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
|
if (( ${#} == 0 )); then
|
||||||
(cd /
|
(cd /
|
||||||
for file in $(git ${args} ls-files); do
|
for file in $(git ${args} ls-files); do
|
||||||
|
Loading…
Reference in New Issue
Block a user