This commit is contained in:
pika 2025-05-25 22:42:59 +02:00
parent 242df2f7e5
commit 5c221b5d63
2 changed files with 10 additions and 3 deletions

View file

@ -479,15 +479,21 @@ __git__() {
# Check if there are any changes on the remote branch # Check if there are any changes on the remote branch
if git diff --quiet "$branch" "origin/$branch"; then if git diff --quiet "$branch" "origin/$branch"; then
if [ -n $2 ]; then if [ -n $2 ]; then
local commit_files="${1:-.}" local commit_files="${1:-.}"
local commit_message="${2:-wip}" local commit_message="${2:-wip}"
else else
local commit_message="${1:-wip}" if [ ! -f "$1" ]; then
local commit_message="$1"
else
local commit_files="${1:-.}"
local commit_message="wip"
fi
fi fi
echo "${CYAN}No changes on the remote branch. Adding changes and pushing with ${RED}${BOLD}'$commit_message'${NC}${CYAN} commit.${NC}" echo "${CYAN}No changes on the remote branch. Adding changes and pushing with ${RED}${BOLD}'$commit_message'${NC}${CYAN} commit.${NC}"
git add "${commit_files:-.}" git add "$commit_files"
git commit -m "$commit_message" git commit -m "$commit_message"
git push git push
else else

3
.zshrc
View file

@ -82,7 +82,8 @@ error_log() {
__shell_qol__() { __shell_qol__() {
if command_exists oh-my-posh; then if command_exists oh-my-posh; then
# eval "$(oh-my-posh init zsh --config 'https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/amro.toml')" # eval "$(oh-my-posh init zsh --config 'https://git.k4li.de/dotfiles/oh-my-posh/raw/branch/main/amro.toml')"
eval "$(oh-my-posh init zsh --config '~/.zsh/themes/power10k_edit.toml')" # eval "$(oh-my-posh init zsh --config '~/.zsh/themes/power10k_edit.toml')"
eval "$(oh-my-posh init zsh --config '~/.zsh/themes/clean-info.toml')"
else else
echo_missing "oh-my-posh" echo_missing "oh-my-posh"
curl -s https://ohmyposh.dev/install.sh | $_sudo bash --norc -s -- -d /usr/bin/ curl -s https://ohmyposh.dev/install.sh | $_sudo bash --norc -s -- -d /usr/bin/