Dotfiles update 2025-12-22 12:22
This commit is contained in:
@@ -36,7 +36,7 @@ print_header() {
|
|||||||
local datetime=$(date '+%a %b %d %H:%M')
|
local datetime=$(date '+%a %b %d %H:%M')
|
||||||
local width=66
|
local width=66
|
||||||
local hline="" && for ((i=0; i<width; i++)); do hline+="═"; done
|
local hline="" && for ((i=0; i<width; i++)); do hline+="═"; done
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${DF_GREY}╒${hline}╕${DF_NC}"
|
echo -e "${DF_GREY}╒${hline}╕${DF_NC}"
|
||||||
echo -e "${DF_GREY}│${DF_NC} ${DF_BOLD}${DF_LIGHT_BLUE}✦ ${user}@${hostname}${DF_NC} ${DF_DIM}dotfiles-doctor${DF_NC} ${datetime} ${DF_GREY}│${DF_NC}"
|
echo -e "${DF_GREY}│${DF_NC} ${DF_BOLD}${DF_LIGHT_BLUE}✦ ${user}@${hostname}${DF_NC} ${DF_DIM}dotfiles-doctor${DF_NC} ${datetime} ${DF_GREY}│${DF_NC}"
|
||||||
@@ -77,9 +77,9 @@ check_warn() {
|
|||||||
|
|
||||||
check_os() {
|
check_os() {
|
||||||
print_section "Operating System"
|
print_section "Operating System"
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||||
if grep -qi "arch\|cachyos" /etc/os-release 2>/dev/null; then
|
if grep -qiI "arch\|cachyos" /etc/os-release 2>/dev/null; then
|
||||||
check_pass "Running on Arch/CachyOS"
|
check_pass "Running on Arch/CachyOS"
|
||||||
else
|
else
|
||||||
check_fail "Not running on Arch/CachyOS"
|
check_fail "Not running on Arch/CachyOS"
|
||||||
@@ -91,13 +91,13 @@ check_os() {
|
|||||||
|
|
||||||
check_shell() {
|
check_shell() {
|
||||||
print_section "Shell Configuration"
|
print_section "Shell Configuration"
|
||||||
|
|
||||||
if [[ -f "$HOME/.zshrc" ]]; then
|
if [[ -f "$HOME/.zshrc" ]]; then
|
||||||
check_pass "Zsh configuration exists"
|
check_pass "Zsh configuration exists"
|
||||||
else
|
else
|
||||||
check_fail "Zsh configuration missing"
|
check_fail "Zsh configuration missing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$SHELL" == *"zsh"* ]]; then
|
if [[ "$SHELL" == *"zsh"* ]]; then
|
||||||
check_pass "Zsh is default shell"
|
check_pass "Zsh is default shell"
|
||||||
else
|
else
|
||||||
@@ -107,10 +107,10 @@ check_shell() {
|
|||||||
|
|
||||||
check_symlinks() {
|
check_symlinks() {
|
||||||
print_section "Symlinks"
|
print_section "Symlinks"
|
||||||
|
|
||||||
local symlink_count=0
|
local symlink_count=0
|
||||||
local broken_count=0
|
local broken_count=0
|
||||||
|
|
||||||
for symlink in ~/.zshrc ~/.gitconfig ~/.vimrc ~/.tmux.conf; do
|
for symlink in ~/.zshrc ~/.gitconfig ~/.vimrc ~/.tmux.conf; do
|
||||||
if [[ -L "$symlink" ]]; then
|
if [[ -L "$symlink" ]]; then
|
||||||
((symlink_count++))
|
((symlink_count++))
|
||||||
@@ -122,7 +122,7 @@ check_symlinks() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $symlink_count -eq 0 ]]; then
|
if [[ $symlink_count -eq 0 ]]; then
|
||||||
check_warn "No symlinks found (may not be installed yet)"
|
check_warn "No symlinks found (may not be installed yet)"
|
||||||
fi
|
fi
|
||||||
@@ -130,14 +130,14 @@ check_symlinks() {
|
|||||||
|
|
||||||
check_vim() {
|
check_vim() {
|
||||||
print_section "Editor Configuration"
|
print_section "Editor Configuration"
|
||||||
|
|
||||||
if command -v vim &> /dev/null; then
|
if command -v vim &> /dev/null; then
|
||||||
local vim_version=$(vim --version | head -1)
|
local vim_version=$(vim --version | head -1)
|
||||||
check_pass "Vim installed: $vim_version"
|
check_pass "Vim installed: $vim_version"
|
||||||
else
|
else
|
||||||
check_fail "Vim not installed"
|
check_fail "Vim not installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v nvim &> /dev/null; then
|
if command -v nvim &> /dev/null; then
|
||||||
local nvim_version=$(nvim --version | head -1)
|
local nvim_version=$(nvim --version | head -1)
|
||||||
check_pass "Neovim installed: $nvim_version"
|
check_pass "Neovim installed: $nvim_version"
|
||||||
@@ -148,17 +148,17 @@ check_vim() {
|
|||||||
|
|
||||||
check_git() {
|
check_git() {
|
||||||
print_section "Git Configuration"
|
print_section "Git Configuration"
|
||||||
|
|
||||||
if command -v git &> /dev/null; then
|
if command -v git &> /dev/null; then
|
||||||
check_pass "Git installed"
|
check_pass "Git installed"
|
||||||
|
|
||||||
if git config --global user.name &> /dev/null; then
|
if git config --global user.name &> /dev/null; then
|
||||||
local git_user=$(git config --global user.name)
|
local git_user=$(git config --global user.name)
|
||||||
check_pass "Git user configured: $git_user"
|
check_pass "Git user configured: $git_user"
|
||||||
else
|
else
|
||||||
check_fail "Git user not configured"
|
check_fail "Git user not configured"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if git config --global user.email &> /dev/null; then
|
if git config --global user.email &> /dev/null; then
|
||||||
local git_email=$(git config --global user.email)
|
local git_email=$(git config --global user.email)
|
||||||
check_pass "Git email configured: $git_email"
|
check_pass "Git email configured: $git_email"
|
||||||
@@ -172,37 +172,37 @@ check_git() {
|
|||||||
|
|
||||||
check_optional_tools() {
|
check_optional_tools() {
|
||||||
print_section "Optional Tools"
|
print_section "Optional Tools"
|
||||||
|
|
||||||
if command -v fzf &> /dev/null; then
|
if command -v fzf &> /dev/null; then
|
||||||
check_pass "fzf installed (fuzzy finder)"
|
check_pass "fzf installed (fuzzy finder)"
|
||||||
else
|
else
|
||||||
check_warn "fzf not installed (command palette requires this)"
|
check_warn "fzf not installed (command palette requires this)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v lastpass-cli &> /dev/null || command -v lpass &> /dev/null; then
|
if command -v lastpass-cli &> /dev/null || command -v lpass &> /dev/null; then
|
||||||
check_pass "LastPass CLI installed"
|
check_pass "LastPass CLI installed"
|
||||||
else
|
else
|
||||||
check_warn "LastPass CLI not installed (password manager)"
|
check_warn "LastPass CLI not installed (password manager)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v tmux &> /dev/null; then
|
if command -v tmux &> /dev/null; then
|
||||||
check_pass "Tmux installed"
|
check_pass "Tmux installed"
|
||||||
else
|
else
|
||||||
check_warn "Tmux not installed (workspaces require this)"
|
check_warn "Tmux not installed (workspaces require this)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v age &> /dev/null || command -v gpg &> /dev/null; then
|
if command -v age &> /dev/null || command -v gpg &> /dev/null; then
|
||||||
check_pass "Encryption tool available (age or gpg)"
|
check_pass "Encryption tool available (age or gpg)"
|
||||||
else
|
else
|
||||||
check_warn "No encryption tool (vault requires age or gpg)"
|
check_warn "No encryption tool (vault requires age or gpg)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v bat &> /dev/null; then
|
if command -v bat &> /dev/null; then
|
||||||
check_pass "bat installed (syntax highlighting)"
|
check_pass "bat installed (syntax highlighting)"
|
||||||
else
|
else
|
||||||
check_warn "bat not installed (optional enhancement)"
|
check_warn "bat not installed (optional enhancement)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v eza &> /dev/null; then
|
if command -v eza &> /dev/null; then
|
||||||
check_pass "eza installed (ls replacement)"
|
check_pass "eza installed (ls replacement)"
|
||||||
else
|
else
|
||||||
@@ -212,7 +212,7 @@ check_optional_tools() {
|
|||||||
|
|
||||||
check_pacman() {
|
check_pacman() {
|
||||||
print_section "Package Manager"
|
print_section "Package Manager"
|
||||||
|
|
||||||
if command -v pacman &> /dev/null; then
|
if command -v pacman &> /dev/null; then
|
||||||
check_pass "Pacman available"
|
check_pass "Pacman available"
|
||||||
else
|
else
|
||||||
@@ -222,7 +222,7 @@ check_pacman() {
|
|||||||
|
|
||||||
check_permissions() {
|
check_permissions() {
|
||||||
print_section "File Permissions"
|
print_section "File Permissions"
|
||||||
|
|
||||||
if [[ -f "$DOTFILES_HOME/install.sh" ]]; then
|
if [[ -f "$DOTFILES_HOME/install.sh" ]]; then
|
||||||
if [[ -x "$DOTFILES_HOME/install.sh" ]]; then
|
if [[ -x "$DOTFILES_HOME/install.sh" ]]; then
|
||||||
check_pass "install.sh is executable"
|
check_pass "install.sh is executable"
|
||||||
@@ -230,7 +230,7 @@ check_permissions() {
|
|||||||
check_fail "install.sh is not executable"
|
check_fail "install.sh is not executable"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$DOTFILES_HOME/bin" ]]; then
|
if [[ -d "$DOTFILES_HOME/bin" ]]; then
|
||||||
local non_exec=$(find "$DOTFILES_HOME/bin" -type f ! -perm /u+x 2>/dev/null | wc -l)
|
local non_exec=$(find "$DOTFILES_HOME/bin" -type f ! -perm /u+x 2>/dev/null | wc -l)
|
||||||
if [[ $non_exec -eq 0 ]]; then
|
if [[ $non_exec -eq 0 ]]; then
|
||||||
@@ -243,22 +243,22 @@ check_permissions() {
|
|||||||
|
|
||||||
check_zsh_plugins() {
|
check_zsh_plugins() {
|
||||||
print_section "Zsh Plugins"
|
print_section "Zsh Plugins"
|
||||||
|
|
||||||
if [[ -d "$HOME/.oh-my-zsh" ]]; then
|
if [[ -d "$HOME/.oh-my-zsh" ]]; then
|
||||||
check_pass "Oh My Zsh installed"
|
check_pass "Oh My Zsh installed"
|
||||||
|
|
||||||
if [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]]; then
|
if [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]]; then
|
||||||
check_pass "zsh-autosuggestions installed"
|
check_pass "zsh-autosuggestions installed"
|
||||||
else
|
else
|
||||||
check_warn "zsh-autosuggestions not installed"
|
check_warn "zsh-autosuggestions not installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]]; then
|
if [[ -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]]; then
|
||||||
check_pass "zsh-syntax-highlighting installed"
|
check_pass "zsh-syntax-highlighting installed"
|
||||||
else
|
else
|
||||||
check_warn "zsh-syntax-highlighting not installed"
|
check_warn "zsh-syntax-highlighting not installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "$HOME/.oh-my-zsh/themes/adlee.zsh-theme" ]]; then
|
if [[ -f "$HOME/.oh-my-zsh/themes/adlee.zsh-theme" ]]; then
|
||||||
check_pass "adlee theme installed"
|
check_pass "adlee theme installed"
|
||||||
else
|
else
|
||||||
@@ -271,20 +271,20 @@ check_zsh_plugins() {
|
|||||||
|
|
||||||
check_dotfiles_dir() {
|
check_dotfiles_dir() {
|
||||||
print_section "Dotfiles Directory"
|
print_section "Dotfiles Directory"
|
||||||
|
|
||||||
if [[ -d "$DOTFILES_HOME" ]]; then
|
if [[ -d "$DOTFILES_HOME" ]]; then
|
||||||
check_pass "Dotfiles directory found: $DOTFILES_HOME"
|
check_pass "Dotfiles directory found: $DOTFILES_HOME"
|
||||||
else
|
else
|
||||||
check_fail "Dotfiles directory not found: $DOTFILES_HOME"
|
check_fail "Dotfiles directory not found: $DOTFILES_HOME"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f "$DOTFILES_HOME/dotfiles.conf" ]]; then
|
if [[ -f "$DOTFILES_HOME/dotfiles.conf" ]]; then
|
||||||
check_pass "Configuration file exists"
|
check_pass "Configuration file exists"
|
||||||
else
|
else
|
||||||
check_warn "Configuration file missing"
|
check_warn "Configuration file missing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$DOTFILES_HOME/.git" ]]; then
|
if [[ -d "$DOTFILES_HOME/.git" ]]; then
|
||||||
check_pass "Git repository initialized"
|
check_pass "Git repository initialized"
|
||||||
else
|
else
|
||||||
@@ -299,7 +299,7 @@ check_dotfiles_dir() {
|
|||||||
print_summary() {
|
print_summary() {
|
||||||
echo ""
|
echo ""
|
||||||
printf "${DF_CYAN}─%.0s${DF_NC}" {1..70}; echo ""
|
printf "${DF_CYAN}─%.0s${DF_NC}" {1..70}; echo ""
|
||||||
|
|
||||||
if [[ $FAILED_CHECKS -eq 0 ]]; then
|
if [[ $FAILED_CHECKS -eq 0 ]]; then
|
||||||
echo -e "${DF_GREEN}✓${DF_NC} All checks passed ($PASSED_CHECKS/$TOTAL_CHECKS)"
|
echo -e "${DF_GREEN}✓${DF_NC} All checks passed ($PASSED_CHECKS/$TOTAL_CHECKS)"
|
||||||
else
|
else
|
||||||
@@ -310,9 +310,9 @@ print_summary() {
|
|||||||
echo -e " ${DF_YELLOW}Warnings:${DF_NC} $WARNING_CHECKS"
|
echo -e " ${DF_YELLOW}Warnings:${DF_NC} $WARNING_CHECKS"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [[ $FAILED_CHECKS -gt 0 ]]; then
|
if [[ $FAILED_CHECKS -gt 0 ]]; then
|
||||||
echo -e "${DF_YELLOW}💡 Tip:${DF_NC} Run 'dotfiles-doctor.sh --fix' to attempt automatic fixes"
|
echo -e "${DF_YELLOW}💡 Tip:${DF_NC} Run 'dotfiles-doctor.sh --fix' to attempt automatic fixes"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -326,7 +326,7 @@ print_summary() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
print_header
|
print_header
|
||||||
|
|
||||||
check_os
|
check_os
|
||||||
check_pacman
|
check_pacman
|
||||||
check_shell
|
check_shell
|
||||||
@@ -337,7 +337,7 @@ main() {
|
|||||||
check_zsh_plugins
|
check_zsh_plugins
|
||||||
check_optional_tools
|
check_optional_tools
|
||||||
check_permissions
|
check_permissions
|
||||||
|
|
||||||
print_summary
|
print_summary
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ get_history() {
|
|||||||
if [[ -f "$HOME/.bash_history" ]]; then
|
if [[ -f "$HOME/.bash_history" ]]; then
|
||||||
cat "$HOME/.bash_history"
|
cat "$HOME/.bash_history"
|
||||||
elif [[ -f "$HOME/.zsh_history" ]]; then
|
elif [[ -f "$HOME/.zsh_history" ]]; then
|
||||||
grep "^:" "$HOME/.zsh_history" | cut -d';' -f2 || cat "$HOME/.zsh_history"
|
grep -I "^:" "$HOME/.zsh_history" | cut -d';' -f2 || cat "$HOME/.zsh_history"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,22 +120,22 @@ show_breakdown() {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${DF_CYAN}Git Commands:${DF_NC}"
|
echo -e " ${DF_CYAN}Git Commands:${DF_NC}"
|
||||||
get_history | grep "^git" | wc -l | xargs printf " %d\n"
|
get_history | grep -I "^git" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo -e " ${DF_CYAN}Navigation (cd):${DF_NC}"
|
echo -e " ${DF_CYAN}Navigation (cd):${DF_NC}"
|
||||||
get_history | grep "^cd" | wc -l | xargs printf " %d\n"
|
get_history | grep -I "^cd" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo -e " ${DF_CYAN}File Operations (ls):${DF_NC}"
|
echo -e " ${DF_CYAN}File Operations (ls):${DF_NC}"
|
||||||
get_history | grep "^ls" | wc -l | xargs printf " %d\n"
|
get_history | grep -I "^ls" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo -e " ${DF_CYAN}Package Management (pacman/paru/yay):${DF_NC}"
|
echo -e " ${DF_CYAN}Package Management (pacman/paru/yay):${DF_NC}"
|
||||||
get_history | grep -E "^(pacman|paru|yay)" | wc -l | xargs printf " %d\n"
|
get_history | grep -I -E "^(pacman|paru|yay)" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo -e " ${DF_CYAN}Editing (vim/nvim):${DF_NC}"
|
echo -e " ${DF_CYAN}Editing (vim/nvim):${DF_NC}"
|
||||||
get_history | grep -E "^(vim|nvim)" | wc -l | xargs printf " %d\n"
|
get_history | grep -I -E "^(vim|nvim)" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo -e " ${DF_CYAN}Dotfiles Commands (dotfiles-):${DF_NC}"
|
echo -e " ${DF_CYAN}Dotfiles Commands (dotfiles-):${DF_NC}"
|
||||||
get_history | grep "^dotfiles-" | wc -l | xargs printf " %d\n"
|
get_history | grep -I "^dotfiles-" | wc -l | xargs printf " %d\n"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
@@ -145,7 +145,7 @@ show_heatmap() {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [[ -f "$HOME/.zsh_history" ]]; then
|
if [[ -f "$HOME/.zsh_history" ]]; then
|
||||||
grep "^:" "$HOME/.zsh_history" | awk -F'[: ]' '{print $2}' | \
|
grep -I "^:" "$HOME/.zsh_history" | awk -F'[: ]' '{print $2}' | \
|
||||||
date -f - "+%H" 2>/dev/null | sort | uniq -c | sort -k2n | while read count hour; do
|
date -f - "+%H" 2>/dev/null | sort | uniq -c | sort -k2n | while read count hour; do
|
||||||
local bar_length=$((count / 5))
|
local bar_length=$((count / 5))
|
||||||
local bar=$(printf '█%.0s' $(seq 1 $bar_length))
|
local bar=$(printf '█%.0s' $(seq 1 $bar_length))
|
||||||
@@ -163,7 +163,7 @@ show_dirs() {
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
if [[ -f "$HOME/.zsh_history" ]]; then
|
if [[ -f "$HOME/.zsh_history" ]]; then
|
||||||
grep "cd " "$HOME/.zsh_history" | awk '{print $NF}' | sort | uniq -c | \
|
grep -I "cd " "$HOME/.zsh_history" | awk '{print $NF}' | sort | uniq -c | \
|
||||||
sort -rn | head -15 | while read count dir; do
|
sort -rn | head -15 | while read count dir; do
|
||||||
printf " ${DF_CYAN}%4d${DF_NC} ${DF_YELLOW}%s${DF_NC}\n" "$count" "$dir"
|
printf " ${DF_CYAN}%4d${DF_NC} ${DF_YELLOW}%s${DF_NC}\n" "$count" "$dir"
|
||||||
done
|
done
|
||||||
@@ -178,14 +178,14 @@ show_git_breakdown() {
|
|||||||
print_section "Git Command Breakdown"
|
print_section "Git Command Breakdown"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
local total=$(get_history | grep "^git" | wc -l)
|
local total=$(get_history | grep -I "^git" | wc -l)
|
||||||
|
|
||||||
if [[ $total -eq 0 ]]; then
|
if [[ $total -eq 0 ]]; then
|
||||||
echo " ${DF_YELLOW}No git commands found${DF_NC}"
|
echo " ${DF_YELLOW}No git commands found${DF_NC}"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
get_history | grep "^git " | awk '{print $2}' | sort | uniq -c | sort -rn | \
|
get_history | grep -I "^git " | awk '{print $2}' | sort | uniq -c | sort -rn | \
|
||||||
head -10 | while read count subcmd; do
|
head -10 | while read count subcmd; do
|
||||||
local percent=$((count * 100 / total))
|
local percent=$((count * 100 / total))
|
||||||
printf " ${DF_YELLOW}git %-15s${DF_NC} ${DF_CYAN}%4d${DF_NC} (${DF_MAGENTA}%3d%%${DF_NC})\n" \
|
printf " ${DF_YELLOW}git %-15s${DF_NC} ${DF_CYAN}%4d${DF_NC} (${DF_MAGENTA}%3d%%${DF_NC})\n" \
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ show_diff() {
|
|||||||
|
|
||||||
cd "$DOTFILES_HOME"
|
cd "$DOTFILES_HOME"
|
||||||
|
|
||||||
if git status --porcelain | grep -q .; then
|
if git status --porcelain | grep -I -q .; then
|
||||||
print_status "Modified files:"
|
print_status "Modified files:"
|
||||||
git status --porcelain | sed 's/^/ /'
|
git status --porcelain | sed 's/^/ /'
|
||||||
else
|
else
|
||||||
@@ -208,7 +208,7 @@ push_changes() {
|
|||||||
|
|
||||||
cd "$DOTFILES_HOME"
|
cd "$DOTFILES_HOME"
|
||||||
|
|
||||||
if ! git status --porcelain | grep -q .; then
|
if ! git status --porcelain | grep -I -q .; then
|
||||||
print_warning "No local changes to push"
|
print_warning "No local changes to push"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -245,7 +245,7 @@ auto_sync() {
|
|||||||
print_status "Pulling from remote..."
|
print_status "Pulling from remote..."
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
|
||||||
if git status --porcelain | grep -q .; then
|
if git status --porcelain | grep -I -q .; then
|
||||||
print_status "Resolving conflicts automatically..."
|
print_status "Resolving conflicts automatically..."
|
||||||
git pull --strategy=ours
|
git pull --strategy=ours
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user