Update dotsfile config with variable

This commit is contained in:
Alexander Rosenberg 2023-05-04 01:31:25 -07:00
parent 0f927aa2a0
commit ea0d66cb11
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -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